Skip to content

Navigation Menu

Sign in
Sign up
Hakju Oh edited this page Oct 5, 2020 · 20 revisions

Migration Script

This page describes what the migration script is, and how to execute it when the OAGIS Repository database image which built by Docker, oagi1docker/srt-repo (srt-repo for short), needs to be updated.

What is the migration script

When we release the updated version of our application, SRT, sometimes the existing database schema and initial data which kept on your machine by the Docker volume need to be also updated. Since the srt-repo image was designed such that the the schema and data are initialized only when the volume is empty, your existing installation will not be affected even if you change the srt-repo tag.

Thus, we provide the method to keep consistency with updated releases by a file written in the vendor-specific SQL, namely the migration script, which consists of DDL and DML statements.

Where is the migration script

When we announce the updated release in need of updating the database schema and data, we will update the script location in this page.

Oracle XE 11g

MySQL 5.7

OAGIS

How to execute the migration script

Note that if you have an experience executing the migration script, you can skip this section.

Oracle XE 11g

You can execute the migration script using SQL clients such as the Oracle SQL Developer. If you don't have Oracle SQL Developer installed, please download and install it on your HOST machine. The following is the instruction to execute the migration script in the Oracle SQL Developer. If you are using other SQL clients, you might find the process to be similar but it is not covered here.

  1. Open Oracle SQL Developer and create a connection to SRT database within the docker container. If a connection already exists simply make the connection and skip the rest of this step.

[Create Connection Menu]
Create Connection Menu

[New / Select Database Connection]

  • Username: oagi
  • Password: oagi
  • Hostname:
    localhost (if you use the Docker CE, a newer Docker distributed binary)
    192.168.99.100 (if you use the Docker Toolbox, but it might be different under your circumstances)
  • Port : 1521
  • SID : XE
  1. Open the migration script file
  • Click File > Open menu.
  • Choose the migration script file.
  1. Run statements
  • Click Run Script button which located on the left-upper side.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /