-
Notifications
You must be signed in to change notification settings - Fork 65
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
PostgreSQL truncation is broken on 2.0.1 #62
Comments
Downgrading to
note the same table references.
|
The #58 change also breaks if you use active storage.
maybe we could add some option to choose between |
Is there any plans on mitigating this issue? |
@GoktugOzturk @foton @marcocarvalho @tanelsuurhans I was the original contributor who introduced using I know that the issue was introduced almost 2 years ago and I'm sorry I haven't noticed it since then, which isn't the best example of how ownership should work in OSS 🙈 Could you give me more details on the issue? Are the tables that cause it to blow up created dynamically so you don't know what are their names at the time of declaring which tables to truncate? |
As of today, 1.99.0 is still the newest version working for us. |
@bsuchodolski, in our case, it is marked as part of the tables to be truncated. There are other tables containing configurations that are not truncated. However, the tables raising the error are marked for truncation but raise the error because of foreign key references. Would it make sense to set |
When doing a big Ruby+Rails upgrade on a Rails 5 app, I've encountered this same issue when needing to bump DatabaseCleaner and other gems for compatibility. I think this could be an option to choose from as variants of the truncation strategy. |
With the recent change on #58 you started using RESTRICT But it breaks our tests right now.
You should only use RESTRICT if the KEEP_TABLES option is defined. Otherwise, CASCADE is the only option to truncate related tables without getting errors.
here is the error:
The text was updated successfully, but these errors were encountered: