Migration, Unification, and Rolenaming |
Top Previous Next |
ModelRight automatically creates Columns in a Relation's child Table for certain Columns in the parent Table. This is referred to as Migration. By default, ModelRight migrates the Columns in the parent Table's primary key (you can also migrate a unique key) to be "foreign key" Columns in the child Table. This ensures that you can use a foreign key constraint (i.e. the CREATE FOREIGN KEY statement) to enforce referential integrity declaratively (vs programmatically with a Trigger). Even after a foreign key column is created, ModelRight will automatically update it when certain changes are made to the parent Column - like name and datatype changes. If you want to give the migrated Column in the child Table a different name, you can "rolename" it. Once rolenamed, name changes made to the parent Column's name will no longer effect the name of the child Column. If two relations contribute child Columns with the same name, ModelRight will automatically "unify" them into a single Column in the child Table. See the Relation Migrate Property Page for more details. |