Prescripts and postscripts are SQL scripts that you want to execute before or after the rest of the schema is generated, or include before or after the CREATE TABLE statement.
It is necessary to write prescripts and postscripts to provide for proper schema generations, but it also can involve a lot of copying, pasting, and renaming to put it all in place. Macro support lets you generate prescripts and postscripts by writing these scripts using a combination of regular SQL and, whenever possible, macros to guarantee reusability and avoid the repetitive copying, pasting, and renaming. Prescripts and postscripts are supported for:
You can create scripts using templates, which can contain both SQL code and macros. The macros help you add the name and properties of objects in the script code. The macros are expanded based on the current state of an model when it generates the schema to the target database.
Prescripts and postscripts have the following characteristics:
CA ERwin Data Modeler macros provide a method to create prescripts and postscripts that are reusable. Here are some examples of the use of prescripts and postscripts:
Note: Prescripts and postscripts can be saved in an CA ERwin Data Modeler template for easy reuse.
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |