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

Make the move to omigrate.0.3.0 from 0.1.0 easier #10

Merged
merged 1 commit into from
Oct 26, 2022
Merged

Conversation

maiste
Copy link
Collaborator

@maiste maiste commented Oct 26, 2022

Following the #9 discussion, it appears that the behaviour is different between the two versions as one stacks the version, whereas the other truncates the table (0.3.0). As omigrate.0.3.0 tries to fetch one result, it can get a random line from the old schema (with multiple entries). To avoid we need to get the last version in the database. This is the best we can do to simplify this transition.

The idea is to keep the old version schema until a new migration is created and truncate the table. However, it won't affect the operation if no new migration is applied.

Note that it still requires an action from the user to add the dirty column with the following SQL command:

ALTER TABLE schema_migrations ADD dirty boolean NOT NULL DEFAULT false;

We need to release this ASAP so people can make the transition quickly 👍

Fixes #9

@maiste maiste requested a review from tmattio October 26, 2022 14:40
@maiste maiste merged commit 4610305 into main Oct 26, 2022
@maiste maiste deleted the fix/compatibility branch October 26, 2022 15:02
mseri pushed a commit to ocaml/opam-repository that referenced this pull request Oct 26, 2022
CHANGES:

- Support driver listing (tmattio/omigrate#8, @maiste)
- Simplify migration to version 0.3 (tmattio/omigrate#10, @maiste)
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.

Latest release breaks current-bench
2 participants