summaryrefslogblamecommitdiffstats
path: root/server/migrations/20190226151600-create-event.js
blob: 59cab864e42007d717b2e12fbdc0da9d8039e6d0 (plain) (tree)






























                                                  
'use strict'
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('events', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      name: {
        type: Sequelize.STRING
      },
      description: {
        type: Sequelize.STRING(2048)
      },
      config: {
        type: Sequelize.INTEGER
      },
      times: {
        type: Sequelize.STRING(4096)
      },
      important: {
        type: Sequelize.BOOLEAN
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('permissions')
  }
}