RELATED VIDEOS |
This video will demonstrate how to update your model and apply the changes to your database, including adding new tables and defining new associations. (Runtime: 4:05)
 |
The Update Database from Model wizard allows you to generate schema migration script for migrating a database to the latest model state.
This topic describes how to migrate an existing database to the latest model state by using the Update Database from Model wizard.
- To start the wizard right-click on an empty area in the Visual Designer and select Update Database from Model.
- If there is no database connection specified for the domain model, the Setup Database Connection Dialog appears. Here you need to specify a connection to your database. If you have previously created connections they will show up in the list. The next image shows this step in the wizard.

- On the next page you have to specify the update strategy. Since you want to migrate your database to the latest model state, you need to select the Migrate Database option. The other case (Create Database) is discussed in the How to: Create a New Database from a Model topic.

Click Next to continue.
- On the Summary Page, you could preview and execute the generated script. Select the Create script file and execute option and click Finish.
What Just Happened?
After clicking finish, OpenAccess ORM will save a copy of the script, and execute it against the database.
Next Steps
To learn how to create a new database from an existing domain model, check out How to: Create a New Database from a Model. For a complete UI reference of the Update Database from Model wizard, read here.