summaryrefslogblamecommitdiffstats
path: root/server/migrations/20180917132233-create-config.js
blob: fe46f626069e92abdba41e3eab37070afb3ec849 (plain) (tree)






























                                                  
'use strict'
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('configs', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      name: {
        type: Sequelize.STRING
      },
      description: {
        type: Sequelize.STRING(2048)
      },
      defaultEntry: {
        type: Sequelize.INTEGER
      },
      timeout: {
        type: Sequelize.INTEGER
      },
      script: {
        type: Sequelize.STRING(4096)
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('configs')
  }
}