The Custom Sequelize Command Line Interface (CLI-Custom)
Custom version 3.1.0.1 - 10th, Dec 2017
- Remove classMethods: associate at models
- Custom attributes to exclude createAt and updateAt
Install CLI global dengan cara
1. Install master sequelize-cli melalui terminal :
$ npm install -g sequelize-cli
2. Kemudian extract dan replace all file node_modules.zip ke direktori usr/lib
Install CLI lokal dengan cara
1. Install master sequelize-cli melalui terminal :
$ npm install --save sequelize-cli
2. Kemudian extract dan replace all file node_modules.zip ke direktori project_Anda
sequelize model:create --name Table_One --attributes column:string
Secara default, hasil generate sequelize-cli akan menghapus classMethods: associate di models
sequelize model:create --name Table_Two --attributes column:string --customs nocreatedat
Hasil generate sequelize-cli akan menghapus kolom createdAt di migrations
sequelize model:create --name Table_Three --attributes column:string --customs noupdatedat
Hasil generate sequelize-cli akan menghapus kolom updatedAt di migrations
sequelize model:create --name Table_Three --attributes column:string --customs nocreatedat,noupdatedat
Hasil generate sequelize-cli akan menghapus kolom createdAt dan updatedAt di migrations
Contribution : Eksa
Email : eksant@gmail.com