%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/workflow/src/migrations/
Upload File :
Create Path :
Current File : /home/opti/workflow/src/migrations/20190224142736-create-request.js

'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('Requests', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      uuid: {
        type: Sequelize.UUID,
        defaultValue: Sequelize.UUIDV4,
        allowNull: true
      },
      serviceType: {
        type: Sequelize.STRING,
        allowNull: true
      },
      title: {
        type: Sequelize.STRING,
        allowNull: true
      },
      description: {
        type: Sequelize.STRING,
        allowNull: true
      },
      amount: {
        type: Sequelize.REAL,
        allowNull: true
      },
      justification: {
        type: Sequelize.STRING,
        allowNull: true
      },
      supervisorComment: {
        type: Sequelize.STRING,
        allowNull: true
      },
      status: {
        type: Sequelize.STRING,
        allowNull: true
      },
      workflowId: {
        type: Sequelize.INTEGER
      },
      owner: {
        type: Sequelize.INTEGER
      },
      targetedStructure: {
        type: Sequelize.INTEGER
      },
      nextOfficer: {
        type: Sequelize.INTEGER
      },
      previousOfficer: {
        type: Sequelize.INTEGER
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('Requests');
  }
};

Zerion Mini Shell 1.0