The purpose of this document is to guide you through the process of creating a new Liquibase project with an Oracle Autonomous Transaction Processing (ATP) or Autonomous Data Warehouse (ADW) database.
In this tutorial, you will generate an example project and follow the instructions to apply and learn concepts associated with creating new Liquibase Projects with Oracle ATP or ADW.
Note: This example assumes that you have created an Oracle Free tier ATP or ADW Database via the Oracle Cloud web console and that you have created an Access Control List during provision with your IP address.
For more information about provisioning the Oracle Autonomous Database Processing or Autonomous Datawarehouse via the Oracle Cloud web console, please see Oracle ATP and ADW related links at the bottom of this page.
liquibase.batfile’s path is set to a location in the
ojdbcdriver jar file for Oracle database.
To Download and install Wallet:
ojdbc.propertiesfile with the following:
javax.net.ssl.trustStorePasswordto the wallet password in step 3.
javax.net.ssl.keyStorePasswordto the wallet password in step 3.
In the wallet folder open the
sqlnet.ora and make sure that
You are now ready to start the tutorial!
To create a Liquibase project with an Oracle ATP or ADW database, begin with the following steps:
ojdbcjar driver file in the
Note: Changelog files contain a sequence of changeSets, each of which make small changes to the structure of your database. Instead of creating an empty changelog file in step 3, you can also use an existing database to generate a changelog. For more information see the Database Changelog File topic.
In this tutorial, you will need to modify your changelog by adding a template.
To add this changelog template:
liquibase.propertiesfile to add the following properties:
Note: In this properties file example, the driver jar file is
ojdbc8.jarunder the classpath: property. Please rename it to match the one that you have previously downloaded accordingly.
If you are on a Windows machine, please also make the
TNS_ADMIN path to your wallet folder with double dashes in the url property. Example:
Now we will manually add a changeSet to the changelog file. Remember, when adding ChangeSets, they are uniquely identified by author and id attributes. Liquibase attempts to execute each changeSet in a transaction that is committed at the end.
To add your changeSets:
myChangeLog.xmlfile line 9 to 20 add a new department by creating a table changeSet as follows:
Note: This create table changeSet is XML format. The corresponding SQL statement should look like the following:
You should see a new department table added to the database.
You should also see two more tables:
For this example: