text: 'use strict';
  
  module.exports = {
    up: (queryInterface, Sequelize) => {
      return queryInterface.createTable("consentLogs", {
        userId: {
          type: Sequelize.UUID,
          references: {
            model: "users",
            key: "id"
          },
          onUpdate: "cascade",
          onDelete: "cascade",
          primaryKey: true
        },
        key: {
          type: Sequelize.STRING,
          primaryKey: true
        },
        description: {
          type: Sequelize.STRING,
          allowNull: false
        },
        given: {
          type: Sequelize.BOOLEAN,
          defaultValue: false,
          allowNull: false
        },
        updatedAt: {
          type: Sequelize.DATE,
          defaultValue: Sequelize.NOW,
          allowNull: false
        }
      });
    },
  
    down: (queryInterface, Sequelize) => {
      return queryInterface.dropTable("consentLogs");
    }
  };
  