Skip to content

Conversation

@houen
Copy link

@houen houen commented May 13, 2014

No description provided.

@houen
Copy link
Author

houen commented May 14, 2014

The drop tables part of db:schema:load is not compatible with databases containing foreign keys (in my case created by the Foreigner gem (https://github.com/matthuhiggins/foreigner). By using db:drop and then db:create before db:schema:load, we can get around that

@grosser
Copy link
Owner

grosser commented May 14, 2014

so db:schema:load would not work in your app anyway -> make it drop+create and you should be good with parallel too

@sj26
Copy link
Contributor

sj26 commented Jun 17, 2014

We should be using db:[schema|structure]:dump then parallel db:test:load_[schema|structure] which handles these cases.

@zenkalia
Copy link

what's the status on this? i'm hitting this issue myself and looking for a solution

@grosser
Copy link
Owner

grosser commented Jul 17, 2014

would be nice to stay close to what rails is doing and not randomly dropping/creating a db,
does parallel:load_schema work ? if not, what do you use to normally load your schema ?

@zenkalia
Copy link

i drop the dbs entirely, actually:

alias psetup='bx rake parallel:drop parallel:create parallel:prepare'

@alexpjohnson
Copy link
Contributor

I'm not sure where this is in the pipeline of getting merged, but Rails recently introduced the rake db:purge method, which will empty the database. The commit is here. This commit documents the change in behavior of db:schema:load, which causes this gem to break on the latest version of Rails.

@grosser
Copy link
Owner

grosser commented Jun 18, 2015

Can you turn this into a PR ?
Ideally something that checks versions and then does load or purge ?

@alexpjohnson
Copy link
Contributor

Sure #407

@grosser grosser closed this Aug 14, 2016
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.

5 participants