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

Add Migration for efficient rollback #414

Merged
merged 1 commit into from
Jan 5, 2021
Merged

Conversation

kderme
Copy link
Contributor

@kderme kderme commented Nov 30, 2020

Fixes #256 and maybe #397. There are two persistent issues that needs to be fixed before merging this

  • One has a pr Fix references Migrations yesodweb/persistent#1167
  • The other I haven't fixed yet. The generated migration is slightly wrong since it drops a constrant:
    EXECUTE 'ALTER TABLE "block" DROP CONSTRAINT "block_previous_id_fkey"' ;
    without replacing it with a correct one. It looks like a persistent bug, easy to fix.

@kderme kderme marked this pull request as draft November 30, 2020 15:54
cabal.project Outdated
type: git
location: https://github.com/kderme/persistent
tag: 2d02c002761ba0ed05ce95aeef1dfc7bd3caa073
--sha256: 0jl6ph2cgrl3n2f6j7ff9gqm0scz2dwxq5vs1q1ijxlli37zfzsx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, but I wonder if it might be more sensible to wait until these are formally released.

@kderme
Copy link
Contributor Author

kderme commented Dec 4, 2020

The second bug is discussed here and a fix is proposed. The fix seems to work at least for our case, so this pr is ready to test now. My manual tests show that slot rollback works fine.

This is great, but I wonder if it might be more sensible to wait until these are formally released.

Yes my fixes will probably change by the time they're merged.

@erikd
Copy link
Contributor

erikd commented Dec 7, 2020

Probably worth investigating these CI failures.

@kderme
Copy link
Contributor Author

kderme commented Dec 8, 2020

Probably worth investigating these CI failures.

This seems to be related to the --only-dependencies flag of ci and the fact that I use a custom branch of persistent at the cabal.project. Eventually though we won't have a custom branch (unless we want this pr merged asap).

@erikd
Copy link
Contributor

erikd commented Jan 5, 2021

Rebased and squashed down this PR. Hope it passes CI.

@erikd erikd marked this pull request as ready for review January 5, 2021 05:56
@erikd erikd merged commit 5ad48ba into master Jan 5, 2021
@iohk-bors iohk-bors bot deleted the kderme/delete-cascade branch January 5, 2021 07:29
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.

Delete/Cascade is slow
2 participants