Created
July 31, 2014 00:19
-
-
Save DanielHeath/300609a17c4b6132cabb to your computer and use it in GitHub Desktop.
Conflict free schema.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[merge "db_structure"] | |
name = regenerate_db_structure | |
driver = ./script/regenerate_structure && cp db/structure.sql %A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db/structure.sql merge=db_structure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Development DB often has useful data, use test env. | |
# db:setup uses existing structure file, so use db:migrate instead. | |
# I use structure.sql, if you're using schema.rb you want db:schema:dump instead of db:structure:dump | |
./bin/rake db:drop db:create db:migrate db:structure:dump RAILS_ENV=test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment