In-Portal built-in deployment engine, that allows to rollout updates easily on production and staging servers. The deployment process looks like this:
- executing database migrations
- importing language pack
- resetting caches (unit config cache, section cache, mod-rewrite cache)
- refreshing themes (looking for added templates)
As part of "executing database migrations" step:
- the "
/modules/custom/install/project_upgrades.sql" file is parsed to detect available revisions
- only revisions that were not yet executed are kept
- SQLs from these revisions are executed
The code, that parses SQLs is doing some magic to separate SQLs one from another especially in cases if:
- the "
#" (comment) symbol is used
- SQL is split across multiple lines
This is how it looks in code:
The supported use cases for above code looks like this:
This SQL however causes "
;" to be added right after "
IF(RmNumber = '', NULL, CONCAT('RM# ', RmNumber))" line resulting in SQL being split into 2 SQLs down the road.
The problem is with
'RM# ' part where whitespace comes right after "