Make some columns nullable in History tables (#873)

* Make some columns nullable in History tables

xmlBytes is made nullable in all history tables since changes performed
by backend actions would not have it. In addition, epp requests are not saved to
ContactHistory since data may contain PII.

requestedByRegistrar in all history tables are made nullable. This
property is set from metadata in epp requests. Null means not provided.
This commit is contained in:
Weimin Yu
2020-11-13 15:25:54 -05:00
committed by GitHub
parent ae6b414b82
commit 51942fcaad
7 changed files with 63 additions and 33 deletions
@@ -0,0 +1,25 @@
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
ALTER table "ContactHistory"
ALTER column history_xml_bytes DROP NOT NULL,
ALTER column history_requested_by_registrar DROP NOT NULL;
ALTER table "DomainHistory"
ALTER column history_xml_bytes DROP NOT NULL,
ALTER column history_requested_by_registrar DROP NOT NULL;
ALTER table "HostHistory"
ALTER column history_xml_bytes DROP NOT NULL,
ALTER column history_requested_by_registrar DROP NOT NULL;