fix: remove +migrate Down section from 081 migration
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:
parent
f25dd04e0b
commit
52ad76e6a4
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user