In order to get Lure to create versioned patch files automatically during export do the following:
During export Lure will now automatically create versioned patch files for all table changes. Consider for example a table with name COMPANY. Lure will create a versioned patch file as follows:
The version of the patch file (34 in the above example) will be set equal to the SVN head revision. Lure cannot create the versioned patch file unless the table source is checked out within the project directory. Lure compares the newly exported table source code with the table source code of the checked out SVN base revision and adds the corresponding ALTER TABLE statements to the patch file.
Note the last extension of the patch file in the above example is
lpatch-pending. This indicates that the patch file is created as a pending patch file. Pending patch files will not be used during import. They need to be reviewed and approved first.
Pending patch files can be approved from within Lure Stage via the context menu. Right click on the pending patch file from within the Lure Project Explorer view and select “Approve Patch” from the popup menu. This will change the name of the file to:
The patch files is now approved and will be used in subsequent import operations.
Note that approving a pending patch file is equivalent to manually renaming the pending patch file as shown above.
Although pending patch files will be ignored during import, they will be executed (and therefore tested) in patch test mode.
Do note: Any statements created by Lure in the patch file have to be carefully reviewed and updated by the developer. Lure does not correctly recognize when a column or table name was renamed. Lure will instead interpret this as a drop (column/table) and add (column/table). Also, currently Lure can only add ALTER statements for columns. Any other table property or storage changes have to be added manually in the patch file.