-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
database migrations #153
database migrations #153
Conversation
src/Simplex/Messaging/Agent/Store/SQLite/Migrations/M_20210101_initial.hs
Outdated
Show resolved
Hide resolved
not a fan of these up and down migrations due to many reasons:
I think we should use migrations as a tool for us to upgrade schema one way, rather than for a user to allow having non matching versions of database and application (who'd want it anyway?) - when the mismatch happens due to application version upgrade the application would then read append only migration table and based on the new migrations it has play them out. List of migrations doesn't have to be duplicated in the code, but built from the files in migrations folder. The first migration would be creation of the migrations table |
removed down migrations
up migrations have to migrate data, not only schema. |
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.
Cool!
The only thing I question is exposing Migrations.app
- this doesn't seem to have any benefit, we could just "call" app
directly inside get
w/t parameterizing it.
No description provided.