Skip to content

Commit

Permalink
include migration down code
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Jun 7, 2024
1 parent 85ed6d9 commit a854048
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion db/migrations/0002_census3.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,15 @@ SET token_alias = (
AND strategy_tokens.chain_id = t.chain_id
AND (strategy_tokens.external_id = t.external_id OR strategy_tokens.external_id IS NULL AND t.external_id IS NULL)
)
WHERE token_alias = '';
WHERE token_alias = '';

-- +goose Down
DROP INDEX IF EXISTS idx_strategy_tokens_token_alias;

CREATE TABLE strategy_tokens_temp AS
SELECT strategy_id, token_id, min_balance, chain_id, external_id
FROM strategy_tokens;

DROP TABLE strategy_tokens;

ALTER TABLE strategy_tokens_temp RENAME TO strategy_tokens;

0 comments on commit a854048

Please sign in to comment.