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

migration command #486

Merged
merged 8 commits into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions FAQ.md
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/)
Copy link
Contributor

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


The Sequelize Command Line Interface (CLI) Frequently Asked Question

How can I generate a model?
Copy link
Contributor

Choose a reason for hiding this comment

The 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line doesnt add much to command below. May be explain name, attributes instead

```
$ sequelize model:create --name User --attributes name:string,state:boolean,birth:date,card:integer
```

What is the command to executes all migrations?
```
Copy link
Collaborator

Choose a reason for hiding this comment

The 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?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line before this.


```
sequelize db:migrate:undo:all
```
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this too


```
sequelize migration:create --name name_migration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this please

```
```json
{
"development": {
Expand Down