'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('userconversations', {
      UserId: {
        type: Sequelize.INTEGER
      },
      ConversationId: {
        type: Sequelize.INTEGER
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      lastRead: {
        type: Sequelize.DATE,
        allowNull: false,
        defaultValue: new Date(0)
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('user_conversation');
  }
};