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

fix migration 5 -> 6 not run #114

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

jlg4
Copy link

@jlg4 jlg4 commented Nov 4, 2021

What does this implement/fix? Explain your changes.

  • fixes if DatabaseVersion == 4, migration 5 -> 6 will not run resulting in invalid schema.
  • adds build.yml github action which builds and runs test on PR's and push'es to master branch.

Does this close any currently open issues?
no, addresses #81

Mention issue using basic-writing-and-formatting-syntax#referencing-issues-and-pull-requests

Any relevant logs, error output, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Where has this been tested?

unit test

.Net Core Version:
net5
Does this introduce a breaking change?

  • Yes
  • [ x] No

Any other comments?

fixes if DatabaseVersion == 4, migration 5 -> 6 will not run resulting in invalid schema.

adds build.yml github action which builds and runs test on PR's and push'es to master branch.

also addresses  matteofabbri#81
@gottscj
Copy link
Contributor

gottscj commented Nov 5, 2021

as shown here: we are missing migration 5.
I did it manually, but it screwed our deployment to prod, as our staging environment did get migration 5.

image

@vova3211
Copy link
Collaborator

vova3211 commented Nov 5, 2021

Hi @jlg4 !
You are right, that because after first migration lastHistory.DatabaseVersion should be increased. Then next migration will be applied also.

Your functionality looks fine, but need more time to review it more precisely.

I'll add hotfix to increase lastHistory.DatabaseVersion after each migration for now. So it won't broke anyone db, and will back to review asap.

@vova3211
Copy link
Collaborator

vova3211 commented Nov 5, 2021

And of course, thanks for your contribution ;)

@vova3211
Copy link
Collaborator

vova3211 commented Nov 5, 2021

@jlg4 new nuget package ready 8.3.3

BUT it won't fix your db automatically.
To get all working delete last migration record with DatabaseVersion = 6. Then deploy you app with new lib version.

@matteofabbri matteofabbri merged commit 8d21610 into matteofabbri:master Feb 7, 2024
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.

None yet

4 participants