/
Creating Postgres Database
Creating Postgres Database
MyBatis Migrations
MyBatis migrations(http://www.mybatis.org/migrations) is used to create or migrate the database and to manage migrations.
Its is used to create the database objects i.e schema, tablespaces, tables, indexes in the postgres database.
Manual Installation of MyBatis Migrations
- Download the latest MyBatis Migrations from Github https://github.com/mybatis/migrations/releases
- Unzip the downloaded file.
- Set the PATH environment variable to include the bin folder in unzipped folder
- Type
migrate info
on the terminal to confirm migrate command has been set up successfully. You should see something similar to the below
Creating the OpenSRP database
- Create the OpenSRP user and database
- Create the OpenSRP tablespaces locations. These locations are in the .properties of the environment
core_tablespace_location='/opt/postgres/core'
error_tablespace_location ='/opt/postgres/error'
schedule_tablespace_location='/opt/postgres/schedule'
feed_tablespace_location='/opt/postgres/feed'
form_tablespace_location='/opt/postgres/form'
- To set up the database objects just run the command below(Make sure to update the username,password and database in .properties to reflect the details used in step 1)
migrate up --path=assets/migrations
This will set the database and create the prerequisite database objects e.g schema, tables, etc.
Edit context.xml and update the postgres user, password and database name
, multiple selections available,
Related content
Postgres Configuration
Postgres Configuration
More like this
Migrating from MySQL to Postgres and vice versa
Migrating from MySQL to Postgres and vice versa
More like this
Server Web Build
Server Web Build
More like this
How to add/edit/remove a table/column
How to add/edit/remove a table/column
More like this
Mybatis
Mybatis
Read with this
Data migration from CouchDb
Data migration from CouchDb
More like this