Modify a table name in a deployed application

FADAcore 2.2.0 and newer

Issue

In application MyApp, table oldTableName should be renamed  newTableName.

There are instances of MyApp in production, updating them should not result in any data loss.

Global search of the field name usages can be perform (Ctrl + Shift + F).

Procedure

1. Increment db version in Modify MyApp/Application info.

2. Modify table name in Modify MyApp/Schema/Tables.

3. Modify the calls to this table in Modify MyApp/Schema/Views and MyApp/Schema/Triggers.

4. Modify the calls to this table in all scripts.

5. Create a new Schema update in Modify MyApp/Schema/Views :

Set previous version number.

Set SQL statement:

ALTER TABLE oldTableName RENAME TO newTableName;

6. Close MyApp/Schema/xxx tabs. Update field name in sql files of source dir

7. Update your dev database : Modify MyApp/Apply schema changes.