Schema Compare for Oracle - 3.0

Schema Compare for Oracle

Example: source-controlling a database using scripts folders - Schema Compare for Oracle

This example shows how you can use scripts folders to source-control a database.

In the example, we will use the Subversion (SVN) source control system and the TortoiseSVN client. The principles are the same with any source control system.

Source-controlling a scripts folder

In this example, we want to source-control our WidgetStaging database schema.

First, we create a scripts folder from our WidgetStaging schema. For information about creating and using scripts folders in Schema Compare for Oracle, see Working with scripts folders.

We name the scripts folder WidgetScripts, and create it in our SVN source control repository:

Then we add the scripts folder to SVN:

We type a commit message and commit the change. The scripts folder representing the WidgetStaging schema is now under source control.

Committing another version of the schema

In this example, we have made some changes to the WidgetStaging schema and want to commit them to source control.

We deploy the WidgetStaging schema to the WidgetScripts scripts folder:

Then we commit the scripts folder changes to source control:

We type a commit message and commit the change. The scripts folder representing the WidgetStaging schema is now up to date.

Reverting to an earlier version of the database

In this example, we want to revert to the first version of the WidgetStaging schema we source-controlled. We can do this by reverting to the earlier version of the scripts folder in SVN and deploying from it using Schema Compare.

To do this, first we update to the first version of the scripts folder in SVN:

Then we begin a new deployment in Schema Compare. We select the scripts folder as the source and the WidgetStaging schema as the target:

Finally, we deploy to the database using the deployment wizard. The WidgetStaging schema is updated from the WidgetScripts scripts folder.

Was this article helpful?

Search support
Forums