"use strict";

module.exports = {
  up: (queryInterface, Sequelize) => {
    const tableFields = {
      kiviAdId: {
        type: Sequelize.UUID,
        defaultValue: Sequelize.UUIDV4,
        allowNull: false,
        primaryKey: true
      },
      email: Sequelize.TEXT,
      createdAt: {
        type: Sequelize.DATE,
        defaultValue: Sequelize.literal("NOW()")
      },
      updatedAt: {
        type: Sequelize.DATE,
        defaultValue: Sequelize.literal("NOW()")
      }
    };
    return queryInterface.createTable("KiviOriginal", tableFields);
  },

  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable("KiviOriginal", {});
  }
};
