Haha-Yes/migrations/20190708171608-create-autoresponse.js

35 lines
771 B
JavaScript
Raw Permalink Normal View History

2022-08-14 22:27:46 +02:00
/* eslint-disable no-unused-vars */
/* eslint-disable indent */
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('autoresponses', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
trigger: {
type: Sequelize.TEXT
},
response: {
type: Sequelize.TEXT
},
type: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('autoresponses');
}
};