summaryrefslogblamecommitdiffstats
path: root/server/migrations/20180726033100-create-role.js
blob: c93014809375680712da9fab6254a34136f7cb34 (plain) (tree)





















                                                
'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
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('roles')
  }
}