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

Comments

Projects
None yet
2 participants
@westonganger
Copy link
Contributor

commented Mar 4, 2015

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 4, 2015

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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2015

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 in 4ee62c2 Mar 20, 2015

@batter

This comment has been minimized.

Copy link
Collaborator

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
You can’t perform that action at this time.