There are several models defined with sequelizejs
for my nodejs project. Here is an example of Event model in event.js
:
const Event = db.define('event', {
id: {type: Sql.INTEGER,
primaryKey:true,
min: 1},
name: {type: Sql.STRING,
min:2,
allowNull: false,
},
event_info: {type: Sql.JSON},
current_step: {type: Sql.STRING},
customer_id: {type: Sql.INTEGER},
access_list: {type: Sql.JSON},
event_snapshot: {type: Sql.JSON},
event_category_id: {type: Sql.INTEGER,
},
status: {type: Sql.STRING,
isIn: ['active', 'cancelled', 'aborted', 'completed']},
last_updated_by_id: {type: Sql.INTEGER},
createdAt: Sql.DATE,
updatedAt: Sql.DATE
});
Is there a way I can create the event
table out of the event.js
in command line?