text: 'use strict';
  
  module.exports = {
    up: async (queryInterface, Sequelize) => {
      await queryInterface.createTable('users_answered', {
        'id': {
          type: Sequelize.INTEGER(11),
          allowNull: false,
          primaryKey: true,
          comment: "null",
          autoIncrement: true
      },
      'questionId': {
          type: Sequelize.INTEGER(11),
          allowNull: false,
          primaryKey: true,
          comment: "null",
          references: {
              model: 'questions',
              key: 'id'
          },
          onUpdate: 'CASCADE',
          onDelete: 'CASCADE',
      },
      'userId': {
          type: Sequelize.INTEGER(11),
          allowNull: false,
          comment: "null",
          references: {
              model: 'users',
              key: 'id'
          },
          onUpdate: 'CASCADE',
          onDelete: 'CASCADE',
      },
      'answerId': {
          type: Sequelize.INTEGER(11),
          allowNull: false,
          primaryKey: true,
          comment: "null",
          references: {
              model: 'answers',
              key: 'id'
          },
          onUpdate: 'CASCADE',
          onDelete: 'CASCADE',
      },
      'createdAt': {
          type: Sequelize.DATE,
          allowNull: false,
          defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
          comment: "null"
      },
      'updatedAt': {
          type: Sequelize.DATE,
          allowNull: false,
          defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
          comment: "null"
      },
      });
    },
    
    down: async (queryInterface, Sequelize) => {
      await queryInterface.dropTable('users_answered');
    }
  };
  