text: 'use strict';
  module.exports = {
    async up(queryInterface, Sequelize) {
      await queryInterface.createTable('Comments', {
        id: {
          allowNull: false,
          autoIncrement: true,
          primaryKey: true,
          type: Sequelize.INTEGER
        },
        comment: {
          type: Sequelize.STRING(500)
        },
        url: {
          type: Sequelize.STRING
        },
        createdAt: {
          allowNull: false,
          type: Sequelize.DATE
        },
        updatedAt: {
          allowNull: false,
          type: Sequelize.DATE
        },
        titleId: {
          type: Sequelize.INTEGER,
          onDelete: 'CASCADE',
          references: {
            model: 'Titles',
            key: 'id',
            as: 'titleId'
          }
        }
      });
    },
    async down(queryInterface, Sequelize) {
      await queryInterface.dropTable('Comments');
    }
  };