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

Add support for adding db indexes via fae:scaffold generator #503

Merged
merged 1 commit into from
Nov 5, 2019

Conversation

jclemans
Copy link
Contributor

Currently, running rails g fae:scaffold TestItem some_attribute:string:index causes the base generator to only generates the model and migration with the attribute name and type. This change gets the base generator to include and pass along the :index arg when generating a new model via the generate fae:scaffold task so you don't have to add another migration to add indexes after the fact.

I'm using this change running the fae gem locally with my spec importer rake task and it's working great to create new models with the usual indexes for slug, position, on_prod/stage attrs included from the get go.

…command so you dont have to add another migration to add indexes after the fact
@jclemans jclemans requested review from jasonfine and jamesmk October 29, 2019 17:49
@jclemans jclemans self-assigned this Oct 29, 2019
@jasonfine
Copy link
Member

awesome! :shipit:

@jamesmk jamesmk merged commit 764fee0 into master Nov 5, 2019
@jclemans jclemans deleted the spec-importer-integration branch September 23, 2020 17:54
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

Successfully merging this pull request may close these issues.

3 participants