text: 'use strict';
  
  module.exports = {
    async up (queryInterface, Sequelize) {
      await queryInterface.createTable('user_accounts', {
        id: {
          primaryKey: true,
          allowNull: false,
          type: Sequelize.UUID
        },
        user_id: {
          allowNull: false,
          type: Sequelize.UUID,
          references: {
            model: {
              tableName: 'users'
            },
            key: 'id'
          },
          onUpdate: 'cascade',
          onDelete: 'cascade',
        },
        account_id: {
          allowNull: false,
          type: Sequelize.UUID,
          references: {
            model: {
              tableName: 'accounts'
            },
            key: 'id'
          },
          onUpdate: 'cascade',
          onDelete: 'cascade',
        },
        created_at: {
          allowNull: false,
          type: Sequelize.DATE
        },
        updated_at: {
          allowNull: false,
          type: Sequelize.DATE
        },
      });
    },
  
    async down (queryInterface, Sequelize) {
      await queryInterface.dropTable('user_accounts');
    }
  };
  