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

Suggestion for updated wiki docs content for 'Adding new fields columns to an existing model' #331

Open
nilliams opened this issue Apr 26, 2017 · 0 comments

Comments

@nilliams
Copy link

I can't quite follow what's going on with tags and releases at the moment, so I don't want to jump in and edit the wiki page, if there're people on older versions, but here's a suggested update to this page, as it is currently misleading/out-of-date and I had to read the code to figure out what to do.

If this looks okay I can submit the edit:


If you have previously created a model, you can add a new migration to add new fields / columns to it.

Run the following command to create a new migration:

nodal g:migration MigrationName --add ExistingModel new_column:type

For example, to add a timestamp column to an existing Event model:

nodal g:migration AddTimestampColumnToEvents --add Event timestamp:datetime

Apply the migration:

nodal db:migrate
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

1 participant