UltraLite Database User's Guide
Utility Programs
The UltraLite Schema Painter
When you first rename a table or column in your schema UltraLite stores the original name of the table or column. For example, if you create a table named cust, and later rename it to customer, cust is saved as the old name. If you then renamed the table a second time, to customer_info, the old name remains cust.
The scheme is designed so that a schema file can be used to alter the schema of an existing database. For example, assume that version one of your application shipped with a table named cust. As part of the changes for version two, you modify your version one schema file by renaming the table to customer. This automatically saves cust as the old name. If you now apply this schema file to a version one database file, UltraLite looks for a table named cust, the old name, and rename it customer. The same applies to columns in a table.
It is therefore important for futue compatibility that you clear the old names from a schema file after a schema file is deployed.
For more information, see Altering the schema of UltraLite databases.
To clear all of the old names in the schema file after deployment
Open the schema file in the UltraLite Schema Painter
Right-click the database
Select Clear Upgrade Information
This sets all of the old names for tables and columns to empty values. You can then safely edit your schema file for the next version of your application.
Sometimes it may be desirable to manually alter the old names of tables and columns. For example, you may have versions one and two of your application deployed and wish to create a single UltraLite schema file that can upgrade both versions one and two of this database to version three.
To manually change old names
Open your schema in the UltraLite Schema Painter
Right-click the database
Choose "Prepare Schema for Deployment
You can use this feature to inspect the current old names in your schema. If you useulxml, you can explicitly set the old name of tables and columns in the <table> and <column> XML elements.