-
Notifications
You must be signed in to change notification settings - Fork 529
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
v2.1.4 breaks backwards compatibility with v2.1.3 #276
Comments
Ouch. I'd consider this serious enough to revert it in a commit, and release 2.1.5 with that revert, then to have a discussion on the original issue about whether or not that should be within paranoia. I believe the answer would be "yes it should be", but we'll probably need it to be opt-in. Please submit a PR which reverts that behaviour. I will review it and then if it's acceptable, merge it then release 2.1.5.
|
Please see PR #277 |
It would nice nice to include a flag when defining a model as |
@laffy I don't think that will work. You need to specify at the validation level if the deleted items should be included or not. Our situation has us requiring
This allows us to have a unique reference that can be used to find archived items but reuse the same titles/names etc for non-archived. |
from this upstream PR for rails 4 https://github.com/rubysherpas/paranoia/pull/277/files and this issue: rubysherpas#276
This is biting us now: We need uniqueness validation of a string column across all records to be able to restore a record and still be sure the column is unique. This works fine with paranoia 2.1.3 but fails with 2.1.4 and 2.1.5. We can accept that the default is to only validate uniqueness across non-deleted records, but we need a way to specify per validation rule wether uniqueness should be across all records or across non-deleted records only. |
The following addition v2.1.3...v2.1.4#diff-ccbdb603cb37c0f5ccb9d8b62932dee4R258 breaks backwards compatibility with v2.1.3
Previous behaviour validated uniqueness constraints across the entire dataset of deleted and non deleted items.
New behaviour seems to exclude deleted items from uniqueness validations.
There doesn't seem to be any way to selective revert to previous behaviour.
The text was updated successfully, but these errors were encountered: