• Lure Stage - New Project

    From within Lure Stage select File -> New from the main menu. Select the Project option.

    Select "Lure Project" and click the Next button. Enter a project name when prompted and click the Finish button.

  • Lure Stage - New Project

    Lure Stage initializes the project with a Lure connect file, a Lure config file and also the top level source folders.

  • Lure Stage - New Project

    Open the connect file for editing by double-clicking on it in the Lure Project Explorer view.

    Enter the connection details for your database. Lure Stage will indicate with a green check mark when the connection details are valid.

  • Lure Stage - New Project

    In the "Schemas and Roles" tab select the "On" check box in the Substitution section. (Using substitution is optional. It is used here to illustrate how to install the same database code to multiple schemas within the same database instance.)

  • Lure Stage - New Project

    Still in the "Schemas and Roles" tab enter all schemas and passwords and also the substitute variables for the schemas that need to be substituted. Only schemas with "Synchronize" checked will be exported/imported. Click the "Test" button to confirm that a connection can be made using this schema. (Note all schema names are case sensitive and should be entered with the exact case as they appear in the database.)

  • Lure Stage - New Project

    On the "Versioned Patches" tab select "Local" from the "Version Control" drop down. (This means Lure will keep a local history of table changes as opposed to depending on a version control system.)

    Enter a patch test schema and password. This schema will be used for testing table patches and therefore has to have a CREATE TABLE privilege. In addition the schema also needs EXECUTE privilege on SYS.DBMS_LOCK, and appropriate tablespace privileges.

  • Lure Stage - New Project

    In the Lure Project Explorer view, right click on the "src" folder and select "Export".

  • Lure Stage - New Project

    Lure connects to the database and extracts all source code to files within the project.

    At the end Lure reports that all object source code has been successfully exported.

    The Lure Project Explorer view now shows a folder tree structure with source files corresponding to all exported source code.

  • Lure Stage - Hyperlinks in console view.

    From within the console view click on the exported file name link to open the corresponding source file for view/editing.

  • At this point you would usually add all source code to the version control system.

    You can do this from within Lure Stage by using a third party Eclipse based plug-in for your version control system (e.g. Subclipse for Subversion).

    If instead you prefer to do this with an external application then make sure not to add the folder ".lure" to the version control system. Consider further to add ".lure" as a file name pattern to the version control system ignore list.

  • Lure Stage - Create PROD.lure-connect

    Make a copy of the "DEV.lure-connect" file and name it "PROD.lure-connect". Do this by making use of the clipboard copy/paste commands available within the Lure Project Explorer context menu.

  • Lure Stage - Create PROD.lure-connect

    Open the file "PROD.lure-connect" for editing. On the "Schemas and Roles" tab, enter new schema names for the two exported schemas. Add TEST3 as a dependent schema (don't check the Synchronize check box). Schema TEST1 has privileges on objects in the TEST3 schema. Lure needs to log in with TEST3 so that it can grant the corresponding privileges. Also add the SYSTEM password. Lure needs this to create the two new schemas. Click the "Hide PW" button to obfuscate the SYSTEM password.

  • Lure Stage - Create PROD.lure-connect

    On the "Connection" tab check the "Enable Import" check box. This will enable subsequent import operations for the connection and schemas as specified in the "PROD.lure-connect" file.

  • Lure Stage - Create PROD.lure-connect

    Set the file "PROD.lure-connect" as the active connect file by clicking "Set As Active Connect File" on the context menu. Export and import operations will use the connection information and schemas/passwords as specified in the active connect file when connecting to the database.

  • Lure Stage - Create PROD.lure-connect

    Right-click on the "src" folder and select "Import" from the context menu.

  • Lure Stage - Create PROD.lure-connect

    During import Lure creates the two schemas TEST1_PR and TEST2_PR and imports all source code from the project source folders into these two schemas.

    Lure reports whether the import was successful or whether any problems were encountered.

  • Lure Stage - Create PROD.lure-connect

    Now we will apply some changes to the DEV schemas (TEST1_DEV and TEST2_DEV) to reflect a typical development cycle. You can use any SQL development tool to apply the changes.

  • Lure Stage - Create PROD.lure-connect

    We are now going to export all database changes to the project source files.

    First change the active connect file to "DEV.lure-connect".

  • Lure Stage - Create PROD.lure-connect

    Now export all source code again. Lure exports only source code corresponding to changed objects and reports all such changes in the console view.

  • Lure Stage - 19

    Lure creates patch files to update tables. It created a patch file table "TABLE_1". The patch file is in a pending status (indicated by the red letter P on top of the file icon). Pending patch files first have to be reviewed, tested and "approved" before they can be used during import operations. In this case the patch file is correct but we will first run a patch test.

  • Lure Stage - 20

    Right-click on the table source file and select "Patch Test" from the context menu.

  • Lure Stage - 20

    Lure tests the patch file by restoring the older version of the table source file in the PATCH_TEST schema. It then executes the patch file and finally extracts the table source once more to verify that the database source for the table matches the file source.

    Lure reports that the patch test succeeded.

  • Lure Stage - 20

    Approve the patch file be selecting "Approve Patch" from the context menu.

  • At this point you would usually add all new and updated source code and patch files to the version control system.

  • Lure Stage - 20

    Set "PROD.lure-connect" as the active connect file. Right-click on the "src" folder and select "Import" from the context menu. Lure successfully imports all changes.

  • Lure Stage - 20

    Lure automatically determines that the patch file is required to bring the table "TABLE_1" up to date. Finally Lure verifies that the table source code in the database matches the table source in the file.