fix: remove +migrate Down section from 081 migration
Some checks failed
CI / test (push) Failing after 1m31s
CI / golangci-lint (push) Failing after 32s
Security Scan / backend-security (push) Failing after 32s
Security Scan / frontend-security (push) Failing after 31s

The migrations runner executes the entire file content in a single
transaction, so the Down section DROP statements were being executed
immediately after the Up section, causing tables to be created then
dropped within the same transaction.
This commit is contained in:
win 2026-03-28 03:25:54 +08:00
parent f25dd04e0b
commit 52ad76e6a4

View File

@ -1,4 +1,3 @@
-- +migrate Up
CREATE TABLE IF NOT EXISTS account_behavior_hourly (
id BIGSERIAL PRIMARY KEY,
@ -37,13 +36,3 @@ CREATE INDEX IF NOT EXISTS idx_account_risk_scores_risk_level ON account_risk_sc
CREATE INDEX IF NOT EXISTS idx_account_risk_scores_risk_score ON account_risk_scores (risk_score DESC);
CREATE INDEX IF NOT EXISTS idx_account_risk_scores_scored_at ON account_risk_scores (scored_at DESC);
-- +migrate Down
DROP INDEX IF EXISTS idx_account_risk_scores_scored_at;
DROP INDEX IF EXISTS idx_account_risk_scores_risk_score;
DROP INDEX IF EXISTS idx_account_risk_scores_risk_level;
DROP TABLE IF EXISTS account_risk_scores;
DROP INDEX IF EXISTS idx_account_behavior_hourly_hour_bucket;
DROP INDEX IF EXISTS idx_account_behavior_hourly_account_id;
DROP TABLE IF EXISTS account_behavior_hourly;