Skip to content
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

Updated with common schema files and seperated postgres data migration #425

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

chenchals
Copy link
Collaborator

@chenchals chenchals commented Jun 2, 2023

  • Updated liquibase schema files
    • copied existing file 202305_avoid...yaml to 20230602_schema_extend.yaml
      • added columnDataType to dropNotNullConstraint
      • updated all constraint names with a _2 suffix as there were name-collisions with named constraints in 20230410_schema_reset.yaml file
    • separated postgres data migration sqls into a different file 20230602_postgres_data_migrate.yaml with dbms: postgresql tag
    • updated column-names with key and value to appropriate: property_key or criteria_key and value to property_value or criteria_value
    • changed the order for OFFSET x LIMIT x to LIMIT x OFFSET x to be compatible with mariadb

@@ -21,7 +21,7 @@ while getopts ":av" arg; do
done

export TANAGRA_DATABASE_NAME=tanagra_db
export TANAGRA_DB_INITIALIZE_ON_START=false
export TANAGRA_DB_INITIALIZE_ON_START=true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is helpful for testing, but please leave it set to false in the main branch. This is the setting we'll deploy with, so I'd like to keep it as the testing default as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@@ -1,9 +1,7 @@
databaseChangeLog:
- changeSet:
id: avoid_postgres_specific_features
id: schema_extend
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changeset file has already been deployed to our test instance (we deploy nightly), so you can't change the name or any of the schema specification for postgres. If you change it to render differently for mariadb/mysql only, then I think that's okay (though I'd want to test to confirm) but changing the postgres rendering will definitely break things.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not follow.

@chenchals chenchals force-pushed the chenchals/DT-409-Aou-Tanagra-common-schema-files branch from 6d12c40 to f8613d3 Compare June 5, 2023 17:53
…y, and criteria_value - since nacent key is a reserved word for mariadb
…mon-schema-files' into chenchals/DT-409-Aou-Tanagra-common-schema-files

# Conflicts:
#	service/src/main/resources/db/changesets/20230602_postgres_data_migrate.yaml
#	service/src/main/resources/db/changesets/20230602_schema_extend.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants