Use the Database Refresh Wizard to update a Data Source to reflect changes to your database, and also apply those updates to affected Database Schemas and Adapters.
The Database Refresh Wizard handles updates differently depending on what is updated (addition, deletion, etc.).
Note: If you previously deleted a table from a Database Schema and are applying an update to that table via the Database Refresh Wizard, the table will not be automatically inserted in the Schema. If the missing table is now needed in the Schema, you must manually add the table to the Database Schema.
- Select File | New | Database Refresh Wizard from the main menu bar.
- The Database Refresh Wizard window appears. Next to the Data Source:, click the Select Data Source button to choose the Data Source to be updated. The Wizard displays a list of all Adapters and Schemas that are linked to the selected Data Source. The list may be filtered, but not edited.
Note: Changes to the Data Source may affect these related objects.
- Click Next. The Select Tables panel appears. The Studio automatically scans your database for tables and columns that do not match those selected and displays the changes.
The Available Tables section (on left) shows all tables that are new, or were not originally selected. The Selected Tables section (on right) shows all pre-existing tables in the Data Source.
- Select the tables from the left and drag to the right. Note that the moved selections still retain their icons, identifying them to be updates.
- Click Next. The refreshed tables are now displayed. Selecting an individual table displays related information in the Column Properties field. Edits are denoted by - >, with the original property on the left and new property on the right. For example: Size: 3 -> 10.
- Once complete, click Next to proceed.
Note: If the Wizard detects a deletion, it will remove the table or column from the Data Source. The table is removed from the Database Adapter's Data Bindings section, including any references to them from the Interactions. If an interaction only has one binding, and that binding has been deleted, the entire interaction will be deleted.
The Database Refresh Wizard will not give you the option to delete a table or column from any Schemas.
Therefore, when deleting from a Data Source, if you want the corresponding tables or columns deleted from the Database Schema and dependent Rulesets, you must open the editors and do it manually.
-
If any of the table or columns have been renamed, they will display as additions and deletions. Select (Control+click) both tables (original and renamed) and click the Rename Table/Column button to instruct the Studio to treat them as a rename. Once you do, any column additions, deletions, or edits are displayed beneath the renamed table.
Note: The Rename Table/Column button is only enabled when both an addition and deletion of the same level object (table, etc.) are selected.
Select any other embedded renamed columns one pair at a time and press the Rename button to apply further renames.
The Wizard applies renames to the Data Source. It applies table renames to the Data Bindings section of Database Adapters, but does not change any existing Interactions.
The Wizard does not apply the rename to Schemas. Although the rename is not reflected in the Schema and Ruleset, all Rules will continue to function correctly.
- Take the next step based on whether there are updates or not:
- If there are no tables to add, skip to the next step.
- If there are additional tables detected, and you have selected them in the Apply Refreshed Tables and Columns panel, click Next. The Table Bindings panel appears. The additions selected in the previous panel appear in the Database Metadata area. All Database Schemas that refer to the Data Source appear in the Database SchemaArea.
Drag the additional tables, etc. from the Table Bindings area to the Schema to which you want them applied in the Database Schema.
Note: You can drag a new table to place it within a Schema, within a different table, or within itself (a like-named table). If you place a new table within a like-named table, a suffix will be added to the name, as table names must be unique.
- Click Finish. If you look in your Database Schema or Database Adapter editors, you will see the changes reflected in the objects. Cleo recommends viewing the affected Schemas and Adapters to make sure you applied all changes that you wanted to apply.
Comments
0 comments
Please sign in to leave a comment.