Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

If dev db has new migration they may become invalid #3

Open
alex-ross opened this issue Jan 31, 2015 · 0 comments
Open

If dev db has new migration they may become invalid #3

alex-ross opened this issue Jan 31, 2015 · 0 comments
Assignees

Comments

@alex-ross
Copy link
Member

Using postgres.

If my development database has more tables in it then the one I trying to pull using cap db:pull my migrations will fail afterwards. When the capistrano task calls rake db:restore it changes the schema_migrations data but will not drop or reset the tables.

To solve this i can manually recreate the database before using rake db:restore.

Is this as designed or is this a bug?

How to recreate:

  1. create an migration in any rails app using PostgreSQL (haven't tried MySQL).
  2. run migration, only on your development machine.
  3. run cap db:pull
  4. run your migrations again and it will fail because the database it tries to create already exists.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants