Correctly restore composite VKeys in DomainContent (#825)

* Restore composite vkeys in DomainContent

PollMessage/BillingEvent vkeys in DomainContent must have their ofy keys
restored from other fields in DomainContent (namely the repo id and their
specific history event ids).

Add PostLoad methods to DomainContent and DomainHistory to do the restoration.

* Fixes for review.

* Deal with foreign-key cycles
This commit is contained in:
Michael Muller 2020-10-07 12:42:01 -04:00 committed by GitHub
parent 96e9c1e0af
commit 151a2afb14
10 changed files with 343 additions and 5 deletions

View file

@ -249,10 +249,13 @@ create sequence temp_history_id_sequence start 1 increment 50;
auth_info_repo_id text,
auth_info_value text,
billing_recurrence_id int8,
billing_recurrence_history_id int8,
autorenew_end_time timestamptz,
autorenew_poll_message_id int8,
autorenew_poll_message_history_id int8,
billing_contact text,
deletion_poll_message_id int8,
deletion_poll_message_history_id int8,
domain_name text,
idn_table_name text,
last_transfer_time timestamptz,
@ -301,10 +304,13 @@ create sequence temp_history_id_sequence start 1 increment 50;
auth_info_repo_id text,
auth_info_value text,
billing_recurrence_id int8,
billing_recurrence_history_id int8,
autorenew_end_time timestamptz,
autorenew_poll_message_id int8,
autorenew_poll_message_history_id int8,
billing_contact text,
deletion_poll_message_id int8,
deletion_poll_message_history_id int8,
domain_name text,
idn_table_name text,
last_transfer_time timestamptz,