summaryrefslogtreecommitdiffstats
path: root/server/migrations/20180917132333-create-entry.js
blob: 20ed4c395eda2b5a303730a7f970cef8c5bbe7e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict'
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('entries', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      name: {
        type: Sequelize.STRING
      },
      script: {
        type: Sequelize.STRING(4096)
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('entries')
  }
}