%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/workflow/src/migrations/
Upload File :
Create Path :
Current File : /home/opti/workflow/src/migrations/20190220144300-create-roles-right.js

'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('RolesRights', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      roleId: {
        type: Sequelize.INTEGER
      },
      moduleId: {
        type: Sequelize.INTEGER
      },
      orgId: {
        type: Sequelize.INTEGER
      },
      canCreate: {
        defaultValue: false,
        type: Sequelize.BOOLEAN
      },
      canView: {
        defaultValue: false,
        type: Sequelize.BOOLEAN
      },
      canEdit: {
        defaultValue: false,
        type: Sequelize.BOOLEAN
      },
      canDelete: {
        defaultValue: false,
        type: Sequelize.BOOLEAN
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('RolesRights');
  }
};

Zerion Mini Shell 1.0