Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alincode/sequelize-merged-sandbox
https://github.com/alincode/sequelize-merged-sandbox
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alincode/sequelize-merged-sandbox
- Owner: alincode
- Created: 2016-07-24T05:16:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-24T09:06:43.000Z (over 8 years ago)
- Last Synced: 2024-11-06T07:26:52.382Z (about 2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sequelize-merged-sandbox
```
npm init -y
npm install -g sequelize-cli
npm install --save sequelize-cli
npm install --save sequelize
sequelize init
npm install --save mysql
```### Create Model(only first time)
```
sequelize model:create --name User --attributes first_name:string,last_name:string,bio:text
sequelize db:migrate
```### Create a migration
```
sequelize migration:create
```### Run migration
```
sequelize db:migrate
```### rollback (don't use it)
```
sequelize db:migrate:undo
```### Create a seed (update content)
```
sequelize seed:create
```### Run seed
```
sequelize db:seed:all
```[doc migrations](http://docs.sequelizejs.com/en/latest/docs/migrations/)