Skip to content
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

Does not play well with Ecto Migrations #52

Closed
unclesnottie opened this issue Oct 26, 2016 · 4 comments
Closed

Does not play well with Ecto Migrations #52

unclesnottie opened this issue Oct 26, 2016 · 4 comments

Comments

@unclesnottie
Copy link
Contributor

If you use mix ecto.gen.migration while mix-test.watch is running, the empty migration gets applied immediately. Then when you update the file with the code for your DB change, it won't get applied in the test env. Currently you have to remember to stop mix-test.watch before generating a migration. Otherwise, you have to drop/create/migrate your test DB once you've finished your migration.

It would be nice if mix-test.watch either ignored the priv/repo/migrations directory or prompted the user before running the tests when the change involves migrations. This would allow a user to more easily prevent this situation.

@lpil
Copy link
Owner

lpil commented Oct 26, 2016

Ignoring priv/repo/migrations sounds good. Want to have a go? :)

@mkaszubowski
Copy link

@lpil doesn't adding migrations to config :mix_test_watch, exclude: ... solve the issue? If you want it added as a default, I'd be happy to send you a pull request, just let me know :)

@lpil
Copy link
Owner

lpil commented Feb 4, 2017

Sounds like a sensible default.

@lpil
Copy link
Owner

lpil commented Jul 25, 2018

This has been done :)

@lpil lpil closed this as completed Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants