Skip to content

Commit 867063a

Browse files
committed
fix(migrations): drop materialized view before altering type
1 parent 1de1d8d commit 867063a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backend/pkg/commons/db/migrations/postgres/20250521170353_convert_int2_to_int4_in_requests_tables.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
-- +goose Up
22
-- +goose StatementBegin
3+
DROP MATERIALIZED VIEW IF EXISTS cached_blocks_deposit_requests_lookup;
34
ALTER TABLE blocks_deposit_requests_v2 ALTER COLUMN index_processed TYPE int4;
45
ALTER TABLE blocks_consolidation_requests_v2 ALTER COLUMN index_processed TYPE int4;
56
ALTER TABLE blocks_withdrawal_requests_v2 ALTER COLUMN index_queued TYPE int4;
67
-- +goose StatementEnd
78

89
-- +goose Down
910
-- +goose StatementBegin
11+
DROP MATERIALIZED VIEW IF EXISTS cached_blocks_deposit_requests_lookup;
1012
ALTER TABLE blocks_deposit_requests_v2 ALTER COLUMN index_processed TYPE int2;
1113
ALTER TABLE blocks_consolidation_requests_v2 ALTER COLUMN index_processed TYPE int2;
1214
ALTER TABLE blocks_withdrawal_requests_v2 ALTER COLUMN index_queued TYPE int2;

0 commit comments

Comments
 (0)