Define a Pre & Post Script
Use the Script Template Editor to define the properties for a script in a physical model.
To define a script
- Click Script Templates on the Model menu.
The Script Template Editor opens.
- Select the script in the Navigation Grid that you want to define.
Note: Click New
on the toolbar to create a new script. Use the Enter filter text box to filter a very large list of scripts to quickly locate the one that you want to define.
- Work with the following options:
Previous
Positions the editor on the previous script in the Navigation Grid.
Next
Positions the editor on the next script in the Navigation Grid.
Sort
Sorts the scripts by alphabetic or reverse alphabetic order. You select the method you want using the drop-down menu that opens after you click the Sort button.
New
Creates a new script that becomes the current object in the editor.
Delete
Deletes the selected script.
Script Template Browser
Opens the Script Template Browser so you can view the tables and views that are attached to a table-level script, view the code that is used by a table-level script, and attach tables and views in a model to a script.
Note: This option is only available for table-level scripts.
Help
Accesses online help for the editor.
Lets you enter text to filter a large list of scripts so you can quickly locate the one that you want.
- Name
Displays the name of the script. You can change the name in this field.
- Type
Displays the script type. Select the script type using the drop-down control.
- Generate As
Specifies whether to generate the script as a pre-script.
- Attach To New
Specifies to attach the selected script to each new table that you create. Clear the check box if you want to manually attach the script to new tables.
- Generate
Generates SQL during forward engineering. Clear the check box if you do not want to generate SQL.
- Click the Code tab to work with the SQL code (including macros) for the selected script.
- Click the Object Creation Order tab to specify script execution order.
- (Optional) Click the Expanded tab to view expanded SQL code.
- (Optional) Click the Comment tab and enter any comments that you want to associate with the script.
- (Optional) Click the UDP tab to work with user-defined properties for the script.
- (Optional) Click the Notes tab to view or enter user notes that you want to associate with the script.
- Click Close.
The script is defined and the Script Template Editor closes.
Copyright © 2019 erwin, Inc.
All rights reserved.
|
|