ci: add liquibase schema versioning#4401
Conversation
aglinxinyuan
left a comment
There was a problem hiding this comment.
Why is this under file-service folder?
I just wanted to keep it with the docker-compose.yml file. Not sure where else to put it. Would |
Yes. Please put it in the SQL folder as a separate docker-compose.yml file so the user can choose whether to use it. Please also fix the Apache header. |
mengw15
left a comment
There was a problem hiding this comment.
I agree with Xinyuan's comments. Additionally, do not hard code the Postgres username and password, since its configurations in storage.conf, and devs may use different credentials. Also please double-check host.docker.internal's cross-platform support.
|
One question, do we need to use docker compose to do this task? is there other options? |
It is easiest for developers if it is integrated into docker compose so that developers don’t need to locally install Liquibase. |
What changes were proposed in this PR?
This PR adds Liquibase to automate local database migrations. Running
docker compose upwill now automatically apply any pending SQL migrations undersql/updates, so developers no longer need to manually run SQL scripts after pulling changes.NB:
<changeSet>element tochangelog.xmlso that Liquibase can detect the new update.\c texera_dbis a line that is being used in every sql update file undersql/updates. However, this is a psql command and not SQL, so Liquibase will throw an error. Authors should not add this line to their update scripts, since the database is already set totexera_dbfor Liquibase indocker-compose.yml.Any related issues, documentation, discussions?
Closes #4400
How was this PR tested?
Locally
Was this PR authored or co-authored using generative AI tooling?
No