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

[WIP] Allow for optimistic locking to be turned on post-production. #704

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tpendragon
Copy link
Collaborator

@tpendragon tpendragon commented Apr 15, 2019

Data should be persisted in such a way that it's okay if optimistic
locking is turned on later, and shouldn't require a data migration.

This will require a migration for postgres, but will give a warning if
it hasn't been run. Existing data will need to be migrated - maybe delay
this for 3.0?

The postgres migration will be something like:
Valkyrie::Persistence::Postgres::ORM::Resource.where(lock_version: nil).update_all(lock_version: 0)

Maybe we can just put it in the migration for the change default db migration file and that'll be fine?

@tpendragon tpendragon force-pushed the optimistic_locking_later branch from dc62244 to f6f9f18 Compare April 15, 2019 22:20
Data should be persisted in such a way that it's okay if optimistic
locking is turned on later, and shouldn't require a data migration.

This will require a migration for postgres, but will give a warning if
it hasn't been run. Existing data will need to be migrated - maybe delay
this for 2.0?
@tpendragon tpendragon force-pushed the optimistic_locking_later branch from f6f9f18 to 73c75cb Compare February 7, 2020 17:03
@tpendragon tpendragon marked this pull request as ready for review February 7, 2020 17:03
@tpendragon tpendragon changed the title Allow for optimistic locking to be turned on post-production. [WIP] Allow for optimistic locking to be turned on post-production. Feb 7, 2020
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.

2 participants