|
Go to: |
Databases, Synchronize Database Schema |
When you change the underlying database tables upon which your application is built, you need to inform Iron Speed Designer of these changes so that Iron Speed Designer generates code matched to your updated table schemas. You can do this using Iron Speed Designer’s database schema synchronization feature. Synchronizing your database schema allows Iron Speed Designer to rebuild your application using the updated database schema.
These database modifications require you to synchronize (refresh) your database schema with your application.
|
|
Adding |
Renaming / Changing |
Deleting |
|
Table |
|
ü |
ü |
|
Primary key |
ü |
ü |
ü |
|
Table fields |
ü |
ü |
ü |
|
Table field type |
|
ü |
|
|
Table field size |
|
ü |
|
|
Default field value |
ü |
ü |
ü |
|
Foreign key relationship |
ü |
ü |
ü |
To synchronize your database schema, select Databases, Synchronize Database Schema. Your application’s database is searched for tables that may require refreshing due to changes in the underlying table definitions. Iron Speed Designer is refreshed with the updated schema. Your application will incorporate the new database changes the next time you build your application.
To accept changes on a table-by-table basis, select Databases, Accept Changes for Selected Table. This gives you the opportunity to de-select any tables you do not wish to synchronize. The tables highlighted in the Application Explorer tree are refreshed. Your application will incorporate the new database changes the next time you build your application.
A database field may be considered new if you renamed the field, its schema order was changed or its type was changed. You can use the Map Field dialog to identify the old field currently used by Iron Speed Designer to its new (renamed) counterpart in the database schema. By mapping the old field to the new one, you can retain previously entered table and page properties.
|
|
Access the Map Field dialog from the Databases folder. |
Iron Speed Designer cannot detect when you’ve renamed a table and unfortunately no mechanism exists to map table name changes.
Iron Speed Designer cannot detect when you’ve renamed your database. To modify your application to use a renamed database, change your database’s name in your application’s Web.config file. This will preserve all the changes you have made to the application as the application is essentially pointing to the same database but with a different name.
Because Iron Speed Designer is not a database schema-editing tool, you cannot add, edit or delete database tables in Iron Speed Designer.
If you synchronize your database schema and the length of a database field has changed, Iron Speed Designer will update the new field width throughout your application. You application must be able to fetch and store data based on the exact field length.
The ‘Text box columns’ values for various fields are not changed if your database schema changes. Doing so would alter the layout of your existing application pages. For example, if your application has 1000 pages, and each was updated with the new ‘Text box columns’ length, the time required to undo these changes would be very long.
You can set the ‘Text box columns’ value globally for a specific field via the Global Display Properties dialog (Tools, Properties…, Display tab, Global Display Properties…).
If you have previously created pages with the schema, Iron Speed Designer may not automatically change the page to reflect the changes you have made to the database schema. This is because Iron Speed Designer does not know whether you have made changes to the page and would like it a certain way. If Iron Speed Designer were to automatically make the changes, your customizations on the page will be overwritten every time you can scan database for changes.
You will need to change your page, or recreate the page if you want the changes to be reflected on the page. Specifically, the following types of changes may not be reflected:
New Foreign Key relationships
New Primary Keys – fields may still be shown as editable.
If you have not made many changes to the page, simply recreate the page to let Iron Speed Designer choose the best control type for each field. If you have modified the page, change the display type for each modified field via the Properties dialog to reflect the changes.
Database and Data Model Enhancement
Adding Virtual Primary Key Relationships
Adding Virtual Foreign Key Relationships
Incorporating Database Schema Changes