summaryrefslogblamecommitdiffstats
path: root/server/migrations/20180717132233-create-group.js
blob: 49088dd9e59e9e4b438b106386997fe04b9d5b0c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                 

                    
                                    






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