-
Notifications
You must be signed in to change notification settings - Fork 2.8k
add options to create migration from files from sql and server (close #1699) #1761
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
Conversation
|
Review app for commit 17b238c deployed to Heroku: https://hge-ci-pull-1761.herokuapp.com |
|
Deploy preview for hasura-docs ready! Built with commit 657a257 |
|
Review app for commit e67ee51 deployed to Heroku: https://hge-ci-pull-1761.herokuapp.com |
|
Review app for commit 657a257 deployed to Heroku: https://hge-ci-pull-1761.herokuapp.com |
|
Review app https://hge-ci-pull-1761.herokuapp.com is deleted |
<!-- The PR description should answer 2 important questions: --> ### What The goal here is to make DDN easier to deploy and manage, so that artifacts don't need to be rebuilt and MBS doesn't need to be deployed in lock-step with engine. Once we have confidence in this we can start ripping out things from MBS. Maybe it can disappear entirely. Context: https://hasurahq.slack.com/archives/C02G2M3C1T3/p1741734025080149?thread_ts=1740509463.160639&cid=C02G2M3C1T3 <!-- What is this PR trying to accomplish (and why, if it's not obvious)? --> <!-- Consider: do we need to add a changelog entry? --> <!-- Does this PR introduce new validation that might break old builds? --> <!-- Consider: do we need to put new checks behind a flag? --> ### How <!-- How is it trying to accomplish it (what are the implementation steps)? --> V3_GIT_ORIGIN_REV_ID: 619ff8f2060819956260257b1359bc49b4978ee2
Description
Something like hasura migrate create --sql-file --metadata-from-server which will create the migration
hasura migrate apply --version xxx --dry-run will add this migration as applied.
Affected components
Related Issues
#1699
Solution and Design
Steps to test and verify
Run
hasura migrate create --sql-file test.sql --metadata-from-server http://localhost:8080The above command will create the migrations under migrations directory.
Now, Run
hasura migrate apply --version <version-of-the-migration> --dry-runThis will mark that version as applied in the database.