User Tools

Site Tools


table_patch_file_requirements

Table Patch File Requirements

It is important to understand how the patch deployment algorithm work:

Patch Deployment Algorithm

  1. Lure first collects all patch files and their version numbers and then retrieves the change history corresponding to the source files from the source code repository. Lures will attempt to only install patch files that exist and will not give an error if a patch file does not exist.
  2. At the end of the patch deployment process Lure will report if any patch files were in fact deployed and will also report if the final state of the table matches the expected state, i.e. whether the table source code matches the table source file.

Therefore:

  1. You don't have to have a patch file for every change stored in the version control repository.
    1. You can delete older (or all) patch files containing changes that have already been deployed to all your environments.
  2. You are allowed to change the code generated by Lure within table patch files. In fact all generated patch source code must be carefully reviewed to ensure data in the tables are correctly preserved/transformed. (See Customizing Table Patch Files.)
  3. You can roll patch files up if necessary.
    1. E.g. if you have two patch files r35 and r67 then you can append all statements from patch r67 to patch r35 as long as there are no other versioned patch files between r35 and r67.
    2. You can delete patch r67 subsequently but this is not essential since Lure will automatically determine at deploy time whether it is necessary to deploy or skip this patch file.
  4. Patch file numbers don't have to match the version numbers where the source file was committed exactly.
    1. For example, if a table source file was committed at revision 38, then even if the patch file number is r72 the patch file might still be applied as long as the next change to the source file was committed after revision 72.
    2. This works because of the way in which repositories like Subversion and Perforce work. If you request a revision 72 of a file then Subversion will return the last committed revision on or before the requested revision.
  5. The order in which patch files with the same revision number (different tables) are executed is not defined. If you need Lure to deploy one table patch file before another table patch file then manually change the revision number accordingly (whilst adhering to the above requirements).
table_patch_file_requirements.txt · Last modified: 2013/07/30 09:55 by admin

Page Tools