Market Data Service is a high-performance financial data API that provides comprehensive Symbol prices of different markets through both RESTful endpoints and real-time WebSocket connections.

20251016210526-add_unique_constraint_candles.js 429B

1234567891011121314151617
  1. 'use strict';
  2. /** @type {import('sequelize-cli').Migration} */
  3. module.exports = {
  4. async up (queryInterface, Sequelize) {
  5. await queryInterface.addConstraint('candles_1h', {
  6. fields: ['symbol_id', 'open_time'],
  7. type: 'unique',
  8. name: 'unique_symbol_open_time'
  9. });
  10. },
  11. async down (queryInterface, Sequelize) {
  12. await queryInterface.removeConstraint('candles_1h', 'unique_symbol_open_time');
  13. }
  14. };