/**
 * Migration: 清理 TradingPair 表中已废弃的 K 线相关字段
 *
 * 对应 Commit: b4c7636
 * 删除字段（实体已移除，TypeORM 不再引用）：
 *   - kline_synthesis_enabled  (BOOLEAN, DEFAULT TRUE)
 *   - kline_interval           (VARCHAR(100), DEFAULT '1m')
 *   - kline_intervals          (VARCHAR(100), DEFAULT '1m,...')
 */
export class CleanupTradingPairDeprecatedColumns1781583054526 {
    async up(queryRunner) {
        await queryRunner.query(`
            ALTER TABLE trading_pairs
                DROP COLUMN IF EXISTS kline_synthesis_enabled,
                DROP COLUMN IF EXISTS kline_interval,
                DROP COLUMN IF EXISTS kline_intervals
        `);
    }

    async down(queryRunner) {
        await queryRunner.query(`
            ALTER TABLE trading_pairs
                ADD COLUMN kline_synthesis_enabled BOOLEAN NOT NULL DEFAULT TRUE,
                ADD COLUMN kline_interval VARCHAR(100) NOT NULL DEFAULT '1m',
                ADD COLUMN kline_intervals VARCHAR(100) NOT NULL DEFAULT '1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,1d,1w,1mon'
        `);
    }
}
