Skip to content

Commit 61f753b

Browse files
committed
fix sql errors
1 parent 92d2a23 commit 61f753b

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

database/src/postgres/migrations/shard_db/20250430152143_procedure_create_new_range_tables.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CREATE OR REPLACE PROCEDURE create_new_range_tables(range_id INT)
1+
CREATE OR REPLACE PROCEDURE create_new_range_tables(range_id numeric(20,0))
22
LANGUAGE plpgsql
33
AS $$
44
DECLARE

database/src/postgres/migrations/shard_db/20250521171609_drop_block_hash_from_state_changes.up.sql

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ DO $$
33
DECLARE
44
i INT;
55
BEGIN
6-
-- Drop column from each partition
7-
FOR i IN 0..99 LOOP
8-
EXECUTE format('ALTER TABLE state_changes_data_%s DROP COLUMN IF EXISTS block_hash', i);
9-
EXECUTE format('ALTER TABLE state_changes_access_key_%s DROP COLUMN IF EXISTS block_hash', i);
10-
EXECUTE format('ALTER TABLE state_changes_contract_%s DROP COLUMN IF EXISTS block_hash', i);
11-
EXECUTE format('ALTER TABLE state_changes_account_%s DROP COLUMN IF EXISTS block_hash', i);
12-
END LOOP;
13-
146
-- Drop column from parent table
157
ALTER TABLE state_changes_data DROP COLUMN IF EXISTS block_hash;
168
ALTER TABLE state_changes_access_key DROP COLUMN IF EXISTS block_hash;

0 commit comments

Comments
 (0)