'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    await queryInterface.addConstraint('candles_1h', {
      fields: ['symbol_id', 'open_time'],
      type: 'unique',
      name: 'unique_symbol_open_time'
    });
  },

  async down (queryInterface, Sequelize) {
    await queryInterface.removeConstraint('candles_1h', 'unique_symbol_open_time');
  }
};
