%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/workflow/src/migrations/
Upload File :
Create Path :
Current File : /home/opti/workflow/src/migrations/20190329093546-create-salary-component.js

'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('SalaryComponents', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      uuid: {
        type: Sequelize.UUID
      },
      orgId: {
        type: Sequelize.INTEGER
      },
      title: {
        type: Sequelize.STRING
      },
      type: {
        type: Sequelize.ENUM,
        values: ['Earning', 'Deduction']
      },
      partOfTotal: {
        type: Sequelize.BOOLEAN
      },
      valueType: {
        type: Sequelize.ENUM,
        values: ['Amount', 'Percentage']
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('SalaryComponents');
  }
};

Zerion Mini Shell 1.0