status-go/protocol/migrations/sqlite/1674210659_add_contact_requ...

17 lines
503 B
MySQL
Raw Normal View History

2023-01-20 14:28:30 +00:00
ALTER TABLE contacts ADD COLUMN contact_request_local_clock INT;
ALTER TABLE contacts ADD COLUMN contact_request_remote_clock INT;
ALTER TABLE contacts ADD COLUMN contact_request_remote_state INT;
UPDATE contacts SET contact_request_state = CASE
WHEN added THEN
contact_request_state = 2
END;
UPDATE contacts SET contact_request_local_clock = last_updated_locally;
UPDATE contacts SET contact_request_remote_state = CASE
WHEN has_added_us THEN
contact_request_state = 3
END;