-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalter_back.txt
14 lines (13 loc) · 881 Bytes
/
alter_back.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
DROP FUNCTION IF EXISTS messages_by_address(text[],text[],bigint,bigint);
DROP TABLE message;
DROP TABLE transaction;
ALTER TABLE transaction_old RENAME TO transaction;
ALTER INDEX transaction_old_pkey RENAME TO transaction_pkey;
ALTER INDEX transaction_old_hash_index RENAME TO transaction_hash_index;
ALTER INDEX transaction_old_height_index RENAME TO transaction_height_index;
ALTER TABLE transaction RENAME CONSTRAINT transaction_old_height_fkey TO transaction_height_fkey;
ALTER TABLE message_old RENAME TO message;
ALTER INDEX message_old_involved_accounts_addresses RENAME TO message_involved_accounts_addresses;
ALTER INDEX message_old_transaction_hash_index RENAME TO message_transaction_hash_index;
ALTER INDEX message_old_type_index RENAME TO message_type_index;
ALTER TABLE message RENAME CONSTRAINT message_old_transaction_hash_fkey TO message_transaction_hash_fkey;