summaryrefslogblamecommitdiffstats
path: root/server/migrations/20180726033100-create-role.js
blob: f3c0e3cd924ad6d107c9818eb55c34d7af3febf5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                
                                    






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