-
Notifications
You must be signed in to change notification settings - Fork 483
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
v1.4.0 cleans the 'schema_migrations' #317
Comments
I'm seeing the same behavior in my app in Rails 4.1. |
Confirming on Rails 4.2 |
Confirmed on Postgres/ActiveRecord/Rails 4.1. It seems that the logic now requires the full |
Yeah, nasty bug. |
Unrelated to Rails. I can confirm on a Sinatra app with ActiveRecords 4.2 |
Same here with Rails 4.2 |
+1 |
1 similar comment
👍 |
I recently upgraded to Rails 4.2 and mistakenly thought that had something to do with my I ended up downgrading to v1.3.0 for the time being, but I also cloned down the project and ran the tests. Everything is passing and there is a spec for this behavior: Any thoughts on how to get a failing test on this? I couldn't help notice that the library runs against Thanks! |
I'm new to the internals of this library, so I spent some time reading through things this afternoon and something that stood out to me was the lack of outer loop testing for truncation and the I took a stab at adding one - both on top of v1.4.0 and off of v1.3.0 in order to ensure that the test was actually proving something. Here are the commits:
The spec isn't great, I'm shelling out to run |
Confirming on Rails 4.2. Had the issue with v1.4.0, downgraded to v1.3.0 and it went away. |
database_cleaner 1.4.0 has a bug that truncates schema_migrations in some environments DatabaseCleaner/database_cleaner#317 Change-Id: I8454f340bcb36a687db028d03d1f3776142ebef8
Same here. (Rails 4.2, PostgreSQL 9.3) Decided to fix it by using except:
Found out the hard way that 'schema_migrations' won't work without prefixing it with 'public.', so thanks for that tip, @bdarfler. |
Same for me. Any fix? |
Same here. |
@odigity I tried your fix but it does not work. |
I just downgrade to 1.3.0. and it works. |
@nafaabout Here are the exact contents of my lib/tasks/db.rake file:
Which runs when I execute |
Has anyone made any progress on this one? I should have some time this week to work on it, but didn't want to duplicate efforts. Thanks! |
For now, just downgrade to version 1.3. — On Sun, Jan 25, 2015 at 4:36 PM, Jon Allured notifications@github.com
|
confirm on rails 4.1.9 |
It's dropping the `schema_migrations` table. See DatabaseCleaner/database_cleaner#317
While we work on a solution to this, I see two workarounds: Either
or Downgrade to 1.3.0 Thanks for your contributions! |
@etagwerker, thanks! Any chance we can get a 1.5.0 release with the fix? |
Could you check that it's working correctly by using |
Master is able to run specs on Rails 4.2 without messing up the |
The fix works perfectly. |
@odigity thanks, it works 👍 |
I just ran into this too. 1.4.1 fixes it |
I would like to add, that if you have something like this
I mean, have 1.4.1 installed, but configured the exception for some table like
|
1.4.0 is reported to have a bug: DatabaseCleaner/database_cleaner#317
1.4.0 is reported to have a bug: DatabaseCleaner/database_cleaner#317
1.4.0 is reported to have a bug: DatabaseCleaner/database_cleaner#317
It seems, in v1.4.0 the cleaner cleans the 'schema_migrations' table as well.
This causes the next db migration to break, because the migration task tries to duplicate old migrations from the very beginning.
The text was updated successfully, but these errors were encountered: