%PDF- %PDF-
Mini Shell

Mini Shell

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

'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('Notifications', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      uuid: {
        type: Sequelize.UUID,
        defaultValue: Sequelize.UUIDV4,
        allowNull: true
      },
      senderId: {
        type: Sequelize.INTEGER
      },
      receiverId: {
        type: Sequelize.INTEGER
      },
      type: {
        type: Sequelize.STRING
      },
      notifiableId: {
        type: Sequelize.INTEGER
      },
      seen: {
        type: Sequelize.INTEGER,
        defaultValue: 0
      },
      message: {
        type: Sequelize.STRING
      },
      url: {
        type: Sequelize.STRING
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('Notifications');
  }
};

Zerion Mini Shell 1.0