/
[deployment] Using file-per-revision for Deployment Script

[deployment] Using file-per-revision for Deployment Script

To minify conflicts during parallel project development by different people I propose, that we:

  1. create separate file for each deployment script revision
  2. make filename consist of date (and time optionally) + task number + optional explanatory text
  3. support for PHP script if present and named the same

I know this can lead up to 80+ files on average project, but in this scheme you have absolute 0 of conflicts due fact, that every developer adds their revision to end of /modules/custom/install/project_upgrades.sql file and uses same revision too.

With this implemented we'll have /modules/custom/install/project_upgrades/ folder where all files will be placed. For example:

# revision created on "12 May 2013" for task number "34545"
2013-05-12.34545.optional-text.sql
2013-05-12.34545.optional-text.php

As mentioned before "option-text" part is completely optional and is only needed if developer makes 2+ commits for same task in same day. In such case adding explanatory short text is better, then adding commit time.

 

After a bit of thinking renaming "project_upgrades" folder into "patches" would make it more appropriate because we really have SQL queries, that patch DB to desired state and doesn't really upgrade it to another version as done with In-Portal releases.

Related Discussions

Related Tasks 

INP-1420 - Getting issue details... STATUS