-
Notifications
You must be signed in to change notification settings - Fork 124
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
db:schema:load fails on second and subsequent attempts #110
Comments
I ran into a similar problem - basically when dealing with FKs you need a I don't know if this is the best way to go about it, but I just use: ActiveRecord::Base.connection.execute("SET FOREIGN_KEY_CHECKS = 0;"); Mind you, this doesn't work in PostgreSQL. |
This becomes even more of a problem in Rails 4.1 due to the automatic test schema maintainance. It would be awesome if there was a way for foreigner to hook into the process and recreate the FKs as necessary. |
I'm on Rails 4.1 and can run |
Here is an example app to reproduce the problem: foreignkeysdemo |
Very helpful @javornikolov. I will have a look at this when I have a free moment. |
Thanks for setting that up, @javornikolov https://github.com/javornikolov On Sun, Apr 27, 2014 at 11:03 PM, Matthew Higgins
|
Trying to run db:schema:load runs the first time, but on subsequent tries it fails trying to drop any tables that have foreign keys defined on them. This is happening in both postgres and sqlserver.
The text was updated successfully, but these errors were encountered: