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

Generator doesnt create migration for versions table #494

Closed
westonganger opened this issue Mar 4, 2015 · 4 comments
Closed

Generator doesnt create migration for versions table #494

westonganger opened this issue Mar 4, 2015 · 4 comments
Milestone

Comments

@westonganger
Copy link
Contributor

I was running the normal generator in Rails 3.2.13 and it does not create the migration(s). When running the generator with the --with-associations flag it only generated the following migrations: CreateVersionAssociations and AddTransactionIdColumnToVersions which again is missing the other migration(s)

@westonganger
Copy link
Contributor Author

Update: seems like this was because the migration already existed in a previous migration. Maybe it would be good to show a message saying the migration already existed

@batter
Copy link
Collaborator

batter commented Mar 20, 2015

Ok, so this is not a dupe of #459? Not sure how to show a warning message for duplicate migrations. If you have knowledge of how that is possible then please make a pull request.

@westonganger
Copy link
Contributor Author

rails does it, i think we should be able to. Relevant Rails source code is here https://github.com/rails/rails/blob/b9fcce3944653db5eb49119c134e8525e91f7aee/railties/lib/rails/generators/actions/create_migration.rb

If i get a chance I will take a look

@batter batter added this to the 4.0.0 milestone Mar 20, 2015
@batter batter closed this as completed in 4ee62c2 Mar 20, 2015
@batter
Copy link
Collaborator

batter commented Mar 20, 2015

Apologies @westonganger, a closer inspection at our migration generator found that this was actually not that difficult!

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

No branches or pull requests

2 participants