-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
migration command #486
migration command #486
Changes from 4 commits
3847b23
f49b6da
d5c0c5e
993097a
884e478
e9f538d
dc0b8f9
60b48d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# sequelize/cli [![Build Status](https://travis-ci.org/sequelize/cli.svg?branch=master)](https://travis-ci.org/sequelize/cli) [![Code Climate](https://codeclimate.com/github/sequelize/cli.png)](https://codeclimate.com/github/sequelize/cli) [![Greenkeeper badge](https://badges.greenkeeper.io/sequelize/cli.svg)](https://greenkeeper.io/) | ||
|
||
The Sequelize Command Line Interface (CLI) Frequently Asked Question | ||
|
||
How can I generate a model? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each question should be heading may be try ## |
||
This is a basic example for a model generation. Also you can add more attributes and datatypes as you needed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line doesnt add much to command below. May be explain |
||
``` | ||
$ sequelize model:create --name User --attributes name:string,state:boolean,birth:date,card:integer | ||
``` | ||
|
||
What is the command to executes all migrations? | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New line before this. |
||
sequelize db:migrate | ||
``` | ||
How can I make a migrations rollback? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New line before this. |
||
|
||
``` | ||
sequelize db:migrate:undo:all | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,7 +198,11 @@ migrations. If you choose `json`, you can specify the path of the file using `mi | |
or the CLI will write to the file `sequelize-meta.json`. If you want to keep the information in the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Get rid of all changes in README |
||
database, using `sequelize`, but want to use a different table, you can change the table name using | ||
`migrationStorageTableName`. | ||
Running the following command will create a migration. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this too |
||
|
||
``` | ||
sequelize migration:create --name name_migration | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this please |
||
``` | ||
```json | ||
{ | ||
"development": { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No status needed on FAQ page