Есть несколько моделей, определенных с sequelizejs
для моего проекта nodejs. Вот пример модели события в 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
});
Есть ли способ создать таблицу event
из event.js
в командной строке?