Last active
July 9, 2016 01:29
-
-
Save hwhelchel/7fcbefc7a0013938d2e2 to your computer and use it in GitHub Desktop.
Undesired Rails Schema Changed (Column moved etc.)
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
pg_dump --create --column-inserts app_development > dump.sql # or whatever your database is called | |
# edit dump.sql and change the column order | |
# stop webserver | |
rails db:drop | |
rails db:create | |
psql -f dump.sql app_development | |
rails db:migrate | |
rails db:test:prepare |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment