-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move table space management from migration scripts #19
Move table space management from migration scripts #19
Conversation
unzip /tmp/mybatis-migrations-3.3.1-bundle.zip -d /opt/mybatis | ||
export MIGRATIONS_HOME=/opt/mybatis/mybatis-migrations-3.3.1 | ||
MIGRATIONS=$MIGRATIONS_HOME/bin | ||
export PATH=$MIGRATIONS:$PATH | ||
migrate up --path=configs/assets/migrations --env=test --force | ||
migrate up --path=configs/assets/migrations --env=test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@githengi how do you think we should test if the migrations are idempotent? Maybe run the migrate up
command twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, yes sure will add that
Looks good to me. Thanks @githengi . This now means that it's up to the deployments to create the tablespace directories, if they'd want tablespaces, right? |
Yes so if deployments use tablespaces the tables spaces are created out of migrations just like creating database, users and roles. |
That's awesome, thanks! |
I get an Error: Cause: org.postgresql.util.PSQLException: ERROR: tablespace "opensrp_core" does not exist when I run MyBatis migrate up flagged with the dir config path, test migration worked. Only changelog has been created. |
you have to create tablespaces externally of migrations or map the tablespaces to the postgres default tablespace |
Closes #18