Child pages
  • Add support for PHP code execution during deployment [5.2.1-RC1]
Skip to end of metadata
Go to start of metadata

We have developed a deployment system that support automatic missing SQL query execution during project deployment on Production/Staging servers.

To make use of it a file /modules/custom/install/project_upgrades.sql needs to be created. File format is pretty simple:

# r48: #37526 - Add Video support for Caregivers
ALTER TABLE `fsi_Users` ADD YouTubeVideoId varchar(255) NOT NULL DEFAULT '';

# r49: #37478 - Create & Integrate "Recent Searches" for Caregivers
....

However there are some actions in deployment process that can't be easily achieved just by executing an SQL query.

I'm proposing to support a /modules/custom/install/project_upgrades.php file as well. I guess we can create it similar to upgrades.php file, where:

  • there is PHP method for each revision that needs some PHP related actions (e.g. revision5 and such)
  • method has 1 argument: mode that can be any of:
    • before executing sql
    • after executing sql
    • after importing language pack

Related Tasks