Applying a template to a database to update the schema
Use the Update Database Schema dialog to apply a template generated from one database to update the schema of another. This is useful when you have a group of databases which you need to keep consistent in their design and content.
About this task
The template must be compatible with the current database. This typically requires that the target database will have been created from a template generated by the source database, or by the same template as the source database.
- create a template file in the iBaseTemplates folder – as specified in the Advanced page of the Options dialog
- create a database in the same folder as the main database .idb file
- The schema update process
-
To create a group of databases with a fully consistent design, you should do the following:
- In iBase, define a group of folder objects in the Common Folder Objects dialog that you want as
a core set of folder objects across a number of databases. You can, if required, view or edit an
object (such as a query or browse definition) to test that it is the one required or update it,
before making it common.
Sets cannot be defined as common folder objects as they refer to specific records in the database, which will not exist in other databases.
- In iBase Designer, make any other changes to the schema that you want to apply to the databases, such as adding or modifying entity and link types, or editing fields.
- Generate the template.
- Use Schema Update to apply the template to each database in turn. The common folder objects will be synchronized between the source database and target database, that is, the result of the update will be that the same set of folder objects exists in both databases.
- In iBase, define a group of folder objects in the Common Folder Objects dialog that you want as
a core set of folder objects across a number of databases. You can, if required, view or edit an
object (such as a query or browse definition) to test that it is the one required or update it,
before making it common.
- What is updated?
-
The following elements are updated in the schema:
- Entity types, link types, fields and standard fields
- Datasheets
- Pick lists, icon lists and SCC lists
- Common folder objects, such as report definitions, queries, charting schemes and so on (but not sets or labeling schemes). Common folder objects are defined in iBase User. For more help, see the iBase help topic Defining Common Folder Objects.
Updating a schema can result in data being removed from the target database. Removing entity or link types will result in the loss of any data stored using these types. Data will also be lost when you remove fields. Ensure that you check the Deletions page of the Update Report carefully before proceeding with the update.