diff --git a/core/src/main/java/google/registry/model/domain/DomainHistory.java b/core/src/main/java/google/registry/model/domain/DomainHistory.java index a773de541..2d0c8cbdb 100644 --- a/core/src/main/java/google/registry/model/domain/DomainHistory.java +++ b/core/src/main/java/google/registry/model/domain/DomainHistory.java @@ -14,14 +14,17 @@ package google.registry.model.domain; +import static com.google.common.collect.ImmutableSet.toImmutableSet; import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; import com.googlecode.objectify.annotation.EntitySubclass; import com.googlecode.objectify.annotation.Ignore; import google.registry.model.ImmutableObject; import google.registry.model.domain.DomainHistory.DomainHistoryId; +import google.registry.model.domain.secdns.DomainDsDataHistory; import google.registry.model.host.HostResource; import google.registry.model.reporting.DomainTransactionRecord; import google.registry.model.reporting.HistoryEntry; @@ -40,10 +43,12 @@ import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.ElementCollection; import javax.persistence.Entity; +import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.IdClass; import javax.persistence.Index; import javax.persistence.JoinColumn; +import javax.persistence.JoinColumns; import javax.persistence.JoinTable; import javax.persistence.OneToMany; import javax.persistence.PostLoad; @@ -95,6 +100,24 @@ public class DomainHistory extends HistoryEntry implements SqlEntity { @Column(name = "host_repo_id") Set> nsHosts; + @OneToMany( + cascade = {CascadeType.ALL}, + fetch = FetchType.EAGER, + orphanRemoval = true) + @JoinColumns({ + @JoinColumn( + name = "domainHistoryRevisionId", + referencedColumnName = "historyRevisionId", + insertable = false, + updatable = false), + @JoinColumn( + name = "domainRepoId", + referencedColumnName = "domainRepoId", + insertable = false, + updatable = false) + }) + Set dsDataHistories; + @Override @Nullable @Access(AccessType.PROPERTY) @@ -162,6 +185,11 @@ public class DomainHistory extends HistoryEntry implements SqlEntity { return nsHosts; } + /** Returns the collection of {@link DomainDsDataHistory} instances. */ + public ImmutableSet getDsDataHistories() { + return nullToEmptyImmutableCopy(dsDataHistories); + } + /** * The values of all the fields on the {@link DomainContent} object after the action represented * by this history object was executed. @@ -278,9 +306,6 @@ public class DomainHistory extends HistoryEntry implements SqlEntity { public Builder setDomainContent(DomainContent domainContent) { getInstance().domainContent = domainContent; - if (domainContent != null) { - getInstance().nsHosts = nullToEmptyImmutableCopy(domainContent.nsHosts); - } return this; } @@ -288,5 +313,22 @@ public class DomainHistory extends HistoryEntry implements SqlEntity { getInstance().parent = Key.create(DomainBase.class, domainRepoId); return this; } + + @Override + public DomainHistory build() { + DomainHistory instance = super.build(); + // TODO(b/171990736): Assert instance.domainContent is not null after database migration. + // Note that we cannot assert that instance.domainContent is not null here because this + // builder is also used to convert legacy HistoryEntry objects to DomainHistory, when + // domainContent is not available. + if (instance.domainContent != null) { + instance.nsHosts = nullToEmptyImmutableCopy(instance.domainContent.nsHosts); + instance.dsDataHistories = + nullToEmptyImmutableCopy(instance.domainContent.getDsData()).stream() + .map(dsData -> DomainDsDataHistory.createFrom(instance.id, dsData)) + .collect(toImmutableSet()); + } + return instance; + } } } diff --git a/core/src/main/java/google/registry/model/domain/secdns/DelegationSignerData.java b/core/src/main/java/google/registry/model/domain/secdns/DelegationSignerData.java index b7689d4a2..39af4b44a 100644 --- a/core/src/main/java/google/registry/model/domain/secdns/DelegationSignerData.java +++ b/core/src/main/java/google/registry/model/domain/secdns/DelegationSignerData.java @@ -17,89 +17,68 @@ package google.registry.model.domain.secdns; import static google.registry.util.PreconditionsUtils.checkArgumentNotNull; import com.googlecode.objectify.annotation.Embed; -import com.googlecode.objectify.annotation.Ignore; import google.registry.model.ImmutableObject; -import google.registry.model.domain.secdns.DelegationSignerData.DelegationSignerDataId; -import google.registry.schema.replay.DatastoreAndSqlEntity; +import google.registry.model.domain.secdns.DelegationSignerData.DomainDsDataId; import java.io.Serializable; -import javax.persistence.Column; +import javax.persistence.Access; +import javax.persistence.AccessType; import javax.persistence.Entity; +import javax.persistence.Id; import javax.persistence.IdClass; import javax.persistence.Index; import javax.persistence.Table; import javax.xml.bind.DatatypeConverter; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.HexBinaryAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * Holds the data necessary to construct a single Delegation Signer (DS) record for a domain. * * @see RFC 5910 * @see RFC 4034 + *

TODO(shicong): Rename this class to DomainDsData. */ @Embed @XmlType(name = "dsData") @Entity +@IdClass(DomainDsDataId.class) @Table(indexes = @Index(columnList = "domainRepoId")) -@IdClass(DelegationSignerDataId.class) -public class DelegationSignerData extends ImmutableObject implements DatastoreAndSqlEntity { +public class DelegationSignerData extends DomainDsDataBase { private DelegationSignerData() {} - @Ignore @XmlTransient @javax.persistence.Id String domainRepoId; - - /** The identifier for this particular key in the domain. */ - @javax.persistence.Id - @Column(nullable = false) - int keyTag; - - /** - * The algorithm used by this key. - * - * @see RFC 4034 Appendix A.1 - */ - @Column(nullable = false) - @XmlElement(name = "alg") - int algorithm; - - /** - * The algorithm used to generate the digest. - * - * @see RFC 4034 Appendix A.2 - */ - @Column(nullable = false) - int digestType; - - /** - * The hexBinary digest of the public key. - * - * @see RFC 4034 Section 5.1.4 - */ - @Column(nullable = false) - @XmlJavaTypeAdapter(HexBinaryAdapter.class) - byte[] digest; + @Override + @Id + @Access(AccessType.PROPERTY) + public String getDomainRepoId() { + return super.getDomainRepoId(); + } + @Override + @Id + @Access(AccessType.PROPERTY) public int getKeyTag() { - return keyTag; + return super.getKeyTag(); } + @Override + @Id + @Access(AccessType.PROPERTY) public int getAlgorithm() { - return algorithm; + return super.getAlgorithm(); } + @Override + @Id + @Access(AccessType.PROPERTY) public int getDigestType() { - return digestType; + return super.getDigestType(); } + @Override + @Id + @Access(AccessType.PROPERTY) public byte[] getDigest() { - return digest; - } - - public String getDigestAsString() { - return digest == null ? "" : DatatypeConverter.printHexBinary(digest); + return super.getDigest(); } public DelegationSignerData cloneWithDomainRepoId(String domainRepoId) { @@ -135,30 +114,135 @@ public class DelegationSignerData extends ImmutableObject implements DatastoreAn return create(keyTag, algorithm, digestType, DatatypeConverter.parseHexBinary(digestAsHex)); } - /** - * Returns the presentation format of this DS record. - * - * @see RFC 4034 Section 5.3 - */ - public String toRrData() { - return String.format( - "%d %d %d %s", - this.keyTag, this.algorithm, this.digestType, DatatypeConverter.printHexBinary(digest)); - } + /** Class to represent the composite primary key of {@link DelegationSignerData} entity. */ + static class DomainDsDataId extends ImmutableObject implements Serializable { - static class DelegationSignerDataId extends ImmutableObject implements Serializable { String domainRepoId; + int keyTag; - private DelegationSignerDataId() {} + int algorithm; - private DelegationSignerDataId(String domainRepoId, int keyTag) { + int digestType; + + byte[] digest; + + /** Hibernate requires this default constructor. */ + private DomainDsDataId() {} + + /** Constructs a {link DomainDsDataId} instance. */ + DomainDsDataId(String domainRepoId, int keyTag, int algorithm, int digestType, byte[] digest) { this.domainRepoId = domainRepoId; this.keyTag = keyTag; + this.algorithm = algorithm; + this.digestType = digestType; + this.digest = digest; + } + + /** + * Returns the domain repository ID. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private String getDomainRepoId() { + return domainRepoId; + } + + /** + * Returns the key tag. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private int getKeyTag() { + return keyTag; + } + + /** + * Returns the algorithm. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private int getAlgorithm() { + return algorithm; + } + + /** + * Returns the digest type. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private int getDigestType() { + return digestType; + } + + /** + * Returns the digest. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private byte[] getDigest() { + return digest; + } + + /** + * Sets the domain repository ID. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setDomainRepoId(String domainRepoId) { + this.domainRepoId = domainRepoId; + } + + /** + * Sets the key tag. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setKeyTag(int keyTag) { + this.keyTag = keyTag; } - public static DelegationSignerDataId create(String domainRepoId, int keyTag) { - return new DelegationSignerDataId(checkArgumentNotNull(domainRepoId), keyTag); + /** + * Sets the algorithm. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setAlgorithm(int algorithm) { + this.algorithm = algorithm; + } + + /** + * Sets the digest type. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setDigestType(int digestType) { + this.digestType = digestType; + } + + /** + * Sets the digest. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setDigest(byte[] digest) { + this.digest = digest; + } + + public static DomainDsDataId create( + String domainRepoId, int keyTag, int algorithm, int digestType, byte[] digest) { + return new DomainDsDataId( + domainRepoId, keyTag, algorithm, digestType, checkArgumentNotNull(digest)); } } } diff --git a/core/src/main/java/google/registry/model/domain/secdns/DomainDsDataBase.java b/core/src/main/java/google/registry/model/domain/secdns/DomainDsDataBase.java new file mode 100644 index 000000000..5fd9b7c7b --- /dev/null +++ b/core/src/main/java/google/registry/model/domain/secdns/DomainDsDataBase.java @@ -0,0 +1,151 @@ +// 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. + +package google.registry.model.domain.secdns; + +import com.googlecode.objectify.annotation.Embed; +import com.googlecode.objectify.annotation.Ignore; +import google.registry.model.ImmutableObject; +import google.registry.schema.replay.DatastoreAndSqlEntity; +import javax.persistence.Access; +import javax.persistence.AccessType; +import javax.persistence.MappedSuperclass; +import javax.persistence.Transient; +import javax.xml.bind.DatatypeConverter; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlTransient; +import javax.xml.bind.annotation.adapters.HexBinaryAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + +/** Base class for {@link DelegationSignerData} and {@link DomainDsDataHistory}. */ +@Embed +@MappedSuperclass +@Access(AccessType.FIELD) +public abstract class DomainDsDataBase extends ImmutableObject implements DatastoreAndSqlEntity { + + @Ignore @XmlTransient @Transient String domainRepoId; + + /** The identifier for this particular key in the domain. */ + @Transient int keyTag; + + /** + * The algorithm used by this key. + * + * @see RFC 4034 Appendix A.1 + */ + @Transient + @XmlElement(name = "alg") + int algorithm; + + /** + * The algorithm used to generate the digest. + * + * @see RFC 4034 Appendix A.2 + */ + @Transient int digestType; + + /** + * The hexBinary digest of the public key. + * + * @see RFC 4034 Section 5.1.4 + */ + @Transient + @XmlJavaTypeAdapter(HexBinaryAdapter.class) + byte[] digest; + + public String getDomainRepoId() { + return domainRepoId; + } + + public int getKeyTag() { + return keyTag; + } + + public int getAlgorithm() { + return algorithm; + } + + public int getDigestType() { + return digestType; + } + + public byte[] getDigest() { + return digest; + } + + /** + * Sets the domain repository ID. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setDomainRepoId(String domainRepoId) { + this.domainRepoId = domainRepoId; + } + + /** + * Sets the key tag. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setKeyTag(int keyTag) { + this.keyTag = keyTag; + } + + /** + * Sets the algorithm. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setAlgorithm(int algorithm) { + this.algorithm = algorithm; + } + + /** + * Sets the digest type. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setDigestType(int digestType) { + this.digestType = digestType; + } + + /** + * Sets the digest. + * + *

This method is private because it is only used by Hibernate. + */ + @SuppressWarnings("unused") + private void setDigest(byte[] digest) { + this.digest = digest; + } + + public String getDigestAsString() { + return digest == null ? "" : DatatypeConverter.printHexBinary(digest); + } + + /** + * Returns the presentation format of this DS record. + * + * @see RFC 4034 Section 5.3 + */ + public String toRrData() { + return String.format( + "%d %d %d %s", + this.keyTag, this.algorithm, this.digestType, DatatypeConverter.printHexBinary(digest)); + } +} diff --git a/core/src/main/java/google/registry/model/domain/secdns/DomainDsDataHistory.java b/core/src/main/java/google/registry/model/domain/secdns/DomainDsDataHistory.java new file mode 100644 index 000000000..1e99ea831 --- /dev/null +++ b/core/src/main/java/google/registry/model/domain/secdns/DomainDsDataHistory.java @@ -0,0 +1,84 @@ +// 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. + +package google.registry.model.domain.secdns; + +import google.registry.model.domain.DomainHistory; +import google.registry.model.ofy.ObjectifyService; +import javax.persistence.Access; +import javax.persistence.AccessType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; + +/** Entity class to represent a historic {@link DelegationSignerData}. */ +@Entity +public class DomainDsDataHistory extends DomainDsDataBase { + + @Id Long dsDataHistoryRevisionId; + + /** ID of the {@link DomainHistory} entity that this entity is associated with. */ + @Column(nullable = false) + Long domainHistoryRevisionId; + + private DomainDsDataHistory() {} + + /** + * Creates a {@link DomainDsDataHistory} instance from given {@link #domainHistoryRevisionId} and + * {@link DelegationSignerData} instance. + */ + public static DomainDsDataHistory createFrom( + long domainHistoryRevisionId, DelegationSignerData dsData) { + DomainDsDataHistory instance = new DomainDsDataHistory(); + instance.domainHistoryRevisionId = domainHistoryRevisionId; + instance.domainRepoId = dsData.domainRepoId; + instance.keyTag = dsData.getKeyTag(); + instance.algorithm = dsData.getAlgorithm(); + instance.digestType = dsData.getDigestType(); + instance.digest = dsData.getDigest(); + instance.dsDataHistoryRevisionId = ObjectifyService.allocateId(); + return instance; + } + + @Override + @Access(AccessType.PROPERTY) + public String getDomainRepoId() { + return super.getDomainRepoId(); + } + + @Override + @Access(AccessType.PROPERTY) + public int getKeyTag() { + return super.getKeyTag(); + } + + @Override + @Access(AccessType.PROPERTY) + public int getAlgorithm() { + return super.getAlgorithm(); + } + + @Override + @Access(AccessType.PROPERTY) + public int getDigestType() { + return super.getDigestType(); + } + + @Override + @Access(AccessType.PROPERTY) + @Column(nullable = false) + public byte[] getDigest() { + return super.getDigest(); + } +} diff --git a/core/src/main/resources/META-INF/persistence.xml b/core/src/main/resources/META-INF/persistence.xml index 33f44f824..d614862b4 100644 --- a/core/src/main/resources/META-INF/persistence.xml +++ b/core/src/main/resources/META-INF/persistence.xml @@ -47,6 +47,7 @@ google.registry.model.domain.DomainHistory google.registry.model.domain.GracePeriod google.registry.model.domain.secdns.DelegationSignerData + google.registry.model.domain.secdns.DomainDsDataHistory google.registry.model.domain.token.AllocationToken google.registry.model.host.HostHistory google.registry.model.host.HostResource diff --git a/core/src/test/java/google/registry/model/history/DomainHistoryTest.java b/core/src/test/java/google/registry/model/history/DomainHistoryTest.java index cbeb24876..54227c966 100644 --- a/core/src/test/java/google/registry/model/history/DomainHistoryTest.java +++ b/core/src/test/java/google/registry/model/history/DomainHistoryTest.java @@ -34,6 +34,7 @@ import google.registry.model.domain.DomainBase; import google.registry.model.domain.DomainContent; import google.registry.model.domain.DomainHistory; import google.registry.model.domain.Period; +import google.registry.model.domain.secdns.DelegationSignerData; import google.registry.model.eppcommon.Trid; import google.registry.model.host.HostResource; import google.registry.model.reporting.DomainTransactionRecord; @@ -141,6 +142,7 @@ public class DomainHistoryTest extends EntityTestCase { newDomainBase("example.tld", "domainRepoId", contact) .asBuilder() .setNameservers(host.createVKey()) + .setDsData(ImmutableSet.of(DelegationSignerData.create(1, 2, 3, new byte[] {0, 1, 2}))) .build(); jpaTm().transact(() -> jpaTm().insert(domain)); return domain; diff --git a/core/src/test/java/google/registry/model/history/LegacyHistoryObjectTest.java b/core/src/test/java/google/registry/model/history/LegacyHistoryObjectTest.java index 5169c0d6e..595443c74 100644 --- a/core/src/test/java/google/registry/model/history/LegacyHistoryObjectTest.java +++ b/core/src/test/java/google/registry/model/history/LegacyHistoryObjectTest.java @@ -116,7 +116,8 @@ public class LegacyHistoryObjectTest extends EntityTestCase { // The objects will be mostly the same, but the DomainHistory object has a couple extra fields assertAboutImmutableObjects() .that(legacyHistoryEntry) - .isEqualExceptFields(fromObjectify, "domainContent", "domainRepoId", "nsHosts"); + .isEqualExceptFields( + fromObjectify, "domainContent", "domainRepoId", "nsHosts", "dsDataHistories"); assertThat(fromObjectify instanceof DomainHistory).isTrue(); DomainHistory legacyDomainHistory = (DomainHistory) fromObjectify; @@ -129,7 +130,12 @@ public class LegacyHistoryObjectTest extends EntityTestCase { .that(legacyDomainHistory) .isEqualExceptFields( // NB: period, transaction records, and other client ID are added in #794 - legacyHistoryFromSql, "period", "domainTransactionRecords", "otherClientId", "nsHosts"); + legacyHistoryFromSql, + "period", + "domainTransactionRecords", + "otherClientId", + "nsHosts", + "dsDataHistories"); assertThat(nullToEmpty(legacyDomainHistory.getNsHosts())) .isEqualTo(nullToEmpty(legacyHistoryFromSql.getNsHosts())); } diff --git a/core/src/test/resources/google/registry/model/schema.txt b/core/src/test/resources/google/registry/model/schema.txt index 579806eb9..f03f1a014 100644 --- a/core/src/test/resources/google/registry/model/schema.txt +++ b/core/src/test/resources/google/registry/model/schema.txt @@ -273,6 +273,7 @@ class google.registry.model.domain.DomainHistory { java.lang.String clientId; java.lang.String otherClientId; java.lang.String reason; + java.util.Set dsDataHistories; java.util.Set domainTransactionRecords; org.joda.time.DateTime modificationTime; } @@ -315,6 +316,14 @@ class google.registry.model.domain.secdns.DelegationSignerData { int digestType; int keyTag; } +class google.registry.model.domain.secdns.DomainDsDataHistory { + byte[] digest; + int algorithm; + int digestType; + int keyTag; + java.lang.Long domainHistoryRevisionId; + java.lang.Long dsDataHistoryRevisionId; +} class google.registry.model.domain.token.AllocationToken { @Id java.lang.String token; boolean discountPremiums; diff --git a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html index c1a55fe28..4766be2b7 100644 --- a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html @@ -261,19 +261,19 @@ td.section { generated on - 2020-10-26 18:19:17.415062 + 2020-10-29 18:43:32.035191 last flyway file - V68__make_reserved_list_nullable_in_registry.sql + V69__change_primary_key_and_add_history_table_for_delegation_signer.sql

 

 

- + SchemaCrawler_Diagram - + generated by @@ -284,2230 +284,2316 @@ td.section { generated on - 2020-10-26 18:19:17.415062 + 2020-10-29 18:43:32.035191 allocationtoken_a08ccbef - - + + public.AllocationToken - - + + [table] - + token - + - + text not null - + domain_name - + - + text - + billingcancellation_6eedf614 - - + + public.BillingCancellation - - + + [table] - + billing_cancellation_id - + - + int8 not null - + registrar_id - + - + text not null - + event_time - + - + timestamptz not null - + billing_time - + - + timestamptz - + billing_event_id - + - + int8 - + billing_recurrence_id - + - + int8 - + billingevent_a57d1815 - - + + public.BillingEvent - - + + [table] - + billing_event_id - + - + int8 not null - + registrar_id - + - + text not null - + event_time - + - + timestamptz not null - + allocation_token_id - + - + text - + billing_time - + - + timestamptz - + cancellation_matching_billing_recurrence_id - + - + int8 - + synthetic_creation_time - + - + timestamptz - + billingcancellation_6eedf614:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_event_id billingrecurrence_5fa2cb01 - - + + public.BillingRecurrence - - + + [table] - + billing_recurrence_id - + - + int8 not null - + registrar_id - + - + text not null - + event_time - + - + timestamptz not null - + recurrence_end_time - + - + timestamptz - + recurrence_time_of_year - + - + text - + billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_recurrence_id - + registrar_6e1503e3 - - + + public.Registrar - - + + [table] - + registrar_id - + - + text not null - + iana_identifier - + - + int8 - + registrar_name - + - + text not null - + - + billingcancellation_6eedf614:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_billing_cancellation_registrar_id domain_6c51cffa - - + + public.Domain - - + + [table] - + repo_id - + - + text not null - + creation_registrar_id - + - + text not null - + creation_time - + - + timestamptz not null - + current_sponsor_registrar_id - + - + text not null - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + domain_name - + - + text - + tld - + - + text - + admin_contact - + - + text - + billing_contact - + - + text - + registrant_contact - + - + text - + tech_contact - + - + text - + transfer_billing_cancellation_id - + - + int8 - + transfer_billing_event_id - + - + int8 - + transfer_billing_recurrence_id - + - + int8 - + transfer_gaining_registrar_id - + - + text - + transfer_losing_registrar_id - + - + text - + billing_recurrence_id - + - + int8 - + autorenew_poll_message_id - + - + int8 - + deletion_poll_message_id - + - + int8 - + autorenew_end_time - + - + timestamptz - + domain_6c51cffa:w->billingcancellation_6eedf614:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_cancellation_id domain_6c51cffa:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_event_id domain_6c51cffa:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_domain_billing_recurrence_id domain_6c51cffa:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_recurrence_id contact_8de8cb16 - - + + public.Contact - - + + [table] - + repo_id - + - + text not null - + creation_registrar_id - + - + text not null - + creation_time - + - + timestamptz not null - + current_sponsor_registrar_id - + - + text not null - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + contact_id - + - + text - + search_name - + - + text - + transfer_gaining_registrar_id - + - + text - + transfer_losing_registrar_id - + - + text - + domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_admin_contact domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_billing_contact domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_registrant_contact domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_tech_contact pollmessage_614a523e - - + + public.PollMessage - - + + [table] - + poll_message_id - + - + int8 not null - + registrar_id - + - + text not null - + contact_repo_id - + - + text - + contact_history_revision_id - + - + int8 - + domain_repo_id - + - + text - + domain_history_revision_id - + - + int8 - + event_time - + - + timestamptz not null - + host_repo_id - + - + text - + host_history_revision_id - + - + int8 - + transfer_response_gaining_registrar_id - + - + text - + transfer_response_losing_registrar_id - + - + text - + - + domain_6c51cffa:w->pollmessage_614a523e:e - - - - - - - - + + + + + + + + fk_domain_autorenew_poll_message_id - + domain_6c51cffa:w->pollmessage_614a523e:e - - - - - - - - + + + + + + + + fk_domain_deletion_poll_message_id - - domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fk2jc69qyg2tv9hhnmif6oa1cx1 - - - - domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fk2u3srsfbei272093m3b3xwj23 - - domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fkjc0r9r5y1lfbt4gpbqw4wsuvq + + + + + + + + + fk2jc69qyg2tv9hhnmif6oa1cx1 domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fk_domain_transfer_gaining_registrar_id + + + + + + + + + fk2u3srsfbei272093m3b3xwj23 domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + + fkjc0r9r5y1lfbt4gpbqw4wsuvq + + + + domain_6c51cffa:w->registrar_6e1503e3:e + + + + + + + + + fk_domain_transfer_gaining_registrar_id + + + + domain_6c51cffa:w->registrar_6e1503e3:e + + + + + + + + fk_domain_transfer_losing_registrar_id billingevent_a57d1815:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_event_cancellation_matching_billing_recurrence_id - + billingevent_a57d1815:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_billing_event_registrar_id graceperiod_cd3b2e8f - - + + public.GracePeriod - - + + [table] - + id - + - + int8 not null - + billing_event_id - + - + int8 - + billing_recurrence_id - + - + int8 - + domain_repo_id - + - + text not null - + graceperiod_cd3b2e8f:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_grace_period_domain_repo_id graceperiod_cd3b2e8f:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_grace_period_billing_event_id graceperiod_cd3b2e8f:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_grace_period_billing_recurrence_id - + billingrecurrence_5fa2cb01:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_billing_recurrence_registrar_id claimsentry_105da9f1 - - + + public.ClaimsEntry - - + + [table] - + revision_id - + - + int8 not null - + domain_label - + - + text not null - + claimslist_3d49bc2b - - + + public.ClaimsList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + claimsentry_105da9f1:w->claimslist_3d49bc2b:e - - - - - - - - + + + + + + + + fk6sc6at5hedffc0nhdcab6ivuq - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk1sfyj7o7954prbn1exk7lpnoe - - - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk93c185fx7chn68uv7nl6uv2s0 - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fkmb7tdiv85863134w1wogtxrb2 + + + + + + + + + fk1sfyj7o7954prbn1exk7lpnoe contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk_contact_transfer_gaining_registrar_id + + + + + + + + + fk93c185fx7chn68uv7nl6uv2s0 contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + + fkmb7tdiv85863134w1wogtxrb2 + + + + contact_8de8cb16:w->registrar_6e1503e3:e + + + + + + + + + fk_contact_transfer_gaining_registrar_id + + + + contact_8de8cb16:w->registrar_6e1503e3:e + + + + + + + + fk_contact_transfer_losing_registrar_id contacthistory_d2964f8a - - + + public.ContactHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_registrar_id - + - + text - + history_modification_time - + - + timestamptz not null - + history_type - + - + text not null - + creation_time - + - + timestamptz - + contact_repo_id - + - + text not null - + contacthistory_d2964f8a:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_contact_history_contact_repo_id - + contacthistory_d2964f8a:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_contact_history_registrar_id pollmessage_614a523e:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_poll_message_domain_repo_id pollmessage_614a523e:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_poll_message_contact_repo_id pollmessage_614a523e:w->contacthistory_d2964f8a:e - - - - - - - - + + + + + + + + fk_poll_message_contact_history pollmessage_614a523e:w->contacthistory_d2964f8a:e - - - - - - - - + + + + + + + + fk_poll_message_contact_history domainhistory_a54cc226 - - + + public.DomainHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_registrar_id - + - + text - + history_modification_time - + - + timestamptz not null - + history_type - + - + text not null - + creation_time - + - + timestamptz - + domain_repo_id - + - + text not null - + - + pollmessage_614a523e:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fk_poll_message_domain_history - + pollmessage_614a523e:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fk_poll_message_domain_history host_f21b78de - - + + public.Host - - + + [table] - + repo_id - + - + text not null - + superordinate_domain - + - + text - + - + pollmessage_614a523e:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_poll_message_host_repo_id - + hosthistory_56210c2 - - + + public.HostHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_registrar_id - + - + text not null - + history_modification_time - + - + timestamptz not null - + history_type - + - + text not null - + host_name - + - + text - + creation_time - + - + timestamptz - + host_repo_id - + - + text not null - + - + pollmessage_614a523e:w->hosthistory_56210c2:e - - - - - - - - + + + + + + + + fk_poll_message_host_history - + pollmessage_614a523e:w->hosthistory_56210c2:e - - - - - - - - + + + + + + + + fk_poll_message_host_history - - pollmessage_614a523e:w->registrar_6e1503e3:e - - - - - - - - - fk_poll_message_registrar_id - - - - pollmessage_614a523e:w->registrar_6e1503e3:e - - - - - - - - - fk_poll_message_transfer_response_gaining_registrar_id - - pollmessage_614a523e:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + + fk_poll_message_registrar_id + + + + pollmessage_614a523e:w->registrar_6e1503e3:e + + + + + + + + + fk_poll_message_transfer_response_gaining_registrar_id + + + + pollmessage_614a523e:w->registrar_6e1503e3:e + + + + + + + + fk_poll_message_transfer_response_losing_registrar_id cursor_6af40e8c - - + + public."Cursor" - - + + [table] - + "scope" - + - + text not null - + type - + - + text not null - + delegationsignerdata_e542a872 - - + + public.DelegationSignerData - - + + [table] - + domain_repo_id - + - + text not null - + key_tag - + - + int4 not null - + + algorithm + + + + + int4 not null + + + digest + + + + + bytea not null + + + digest_type + + + + + int4 not null + + delegationsignerdata_e542a872:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fktr24j9v14ph2mfuw2gsmt12kq domainhistory_a54cc226:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_domain_history_domain_repo_id - + domainhistory_a54cc226:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_domain_history_registrar_id domainhost_1ea127c2 - - + + public.DomainHost - - + + [table] - + domain_repo_id - + - + text not null - + host_repo_id - + - + text - + domainhost_1ea127c2:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fkfmi7bdink53swivs390m2btxg - + domainhost_1ea127c2:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_domainhost_host_valid host_f21b78de:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_host_superordinate_domain - + - domainhistoryhost_9f3f23ee - - - public.DomainHistoryHost + domaindsdatahistory_995b060d + + + public.DomainDsDataHistory - - + + [table] - - domain_history_history_revision_id + + ds_data_history_revision_id - + - + int8 not null - + + domain_history_revision_id + + + + + int8 not null + + + domain_repo_id + + + + + text + + + + + domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e + + + + + + + + + fko4ilgyyfnvppbpuivus565i0j + + + + domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e + + + + + + + + + fko4ilgyyfnvppbpuivus565i0j + + + + domainhistoryhost_9f3f23ee + + + public.DomainHistoryHost + + + + [table] + + + domain_history_history_revision_id + + + + + int8 not null + + domain_history_domain_repo_id - + - + text not null - + - + domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fka9woh3hu8gx5x0vly6bai327n - + domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fka9woh3hu8gx5x0vly6bai327n - + domaintransactionrecord_6e77ff61 - - + + public.DomainTransactionRecord - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + domain_repo_id - + - + text - + history_revision_id - + - + int8 - + - + domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fkcjqe54u72kha71vkibvxhjye7 - + domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fkcjqe54u72kha71vkibvxhjye7 - + hosthistory_56210c2:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_hosthistory_host - + hosthistory_56210c2:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk3d09knnmxrt6iniwnp8j2ykga - + lock_f21d4861 - - + + public.Lock - - + + [table] - + resource_name - + - + text not null - + tld - + - + text not null - + - + premiumentry_b0060b91 - - + + public.PremiumEntry - - + + [table] - + revision_id - + - + int8 not null - + domain_label - + - + text not null - + - + premiumlist_7c3ea68b - - + + public.PremiumList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + name - + - + text not null - + - + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 - + rderevision_83396864 - - + + public.RdeRevision - - + + [table] - + tld - + - + text not null - + mode - + - + text not null - + "date" - + - + date not null - + - + registrarpoc_ab47054d - - + + public.RegistrarPoc - - + + [table] - + email_address - + - + text not null - + gae_user_id - + - + text - + registrar_id - + - + text not null - + - + registrylock_ac88663e - - + + public.RegistryLock - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + registrar_id - + - + text not null - + repo_id - + - + text not null - + verification_code - + - + text not null - + relock_revision_id - + - + int8 - + - + registrylock_ac88663e:w->registrylock_ac88663e:e - - - - - - - - + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 - + reservedentry_1a7b8520 - - + + public.ReservedEntry - - + + [table] - + revision_id - + - + int8 not null - + domain_label - + - + text not null - + - + reservedlist_b97c3f1c - - + + public.ReservedList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + name - + - + text not null - + - + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc - + spec11threatmatch_a61228a6 - - + + public.Spec11ThreatMatch - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + check_date - + - + date not null - + registrar_id - + - + text not null - + tld - + - + text not null - + - + tld_f1fa57e2 - - + + public.Tld - - + + [table] - + tld_name - + - + text not null - + - + transaction_d50389d4 - - + + public.Transaction - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + @@ -3395,6 +3481,21 @@ td.section { key_tag int4 not null + + + algorithm + int4 not null + + + + digest + bytea not null + + + + digest_type + int4 not null + @@ -3418,6 +3519,21 @@ td.section { key_tag + + + algorithm + + + + + digest_type + + + + + digest + + @@ -3827,6 +3943,69 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
public.DomainDsDataHistory [table] +
ds_data_history_revision_idint8 not null
domain_history_revision_idint8 not null
domain_repo_idtext
Primary Key
DomainDsDataHistory_pkey[primary key]
ds_data_history_revision_id
Foreign Keys
fko4ilgyyfnvppbpuivus565i0j[foreign key, with no action]
domain_repo_id (0..many)→ public.DomainHistory.domain_repo_id
domain_history_revision_id (0..many)→ public.DomainHistory.history_revision_id
+

 

@@ -3917,6 +4096,23 @@ td.section { + + + + + + + + + + + + + + + + + diff --git a/db/src/main/resources/sql/er_diagram/full_er_diagram.html b/db/src/main/resources/sql/er_diagram/full_er_diagram.html index 403a48622..6457e7fa9 100644 --- a/db/src/main/resources/sql/er_diagram/full_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/full_er_diagram.html @@ -261,19 +261,19 @@ td.section { - + - +
public.DomainHistory [table]
fko4ilgyyfnvppbpuivus565i0j[foreign key, with no action]
domain_repo_id ←(0..many) public.DomainDsDataHistory.domain_repo_id
history_revision_id ←(0..many) public.DomainDsDataHistory.domain_history_revision_id
fka9woh3hu8gx5x0vly6bai327n [foreign key, with no action]
generated on2020-10-26 18:19:15.6173592020-10-29 18:43:30.466482
last flyway fileV68__make_reserved_list_nullable_in_registry.sqlV69__change_primary_key_and_add_history_table_for_delegation_signer.sql

 

 

- + SchemaCrawler_Diagram - + generated by @@ -284,5430 +284,5524 @@ td.section { generated on - 2020-10-26 18:19:15.617359 + 2020-10-29 18:43:30.466482 allocationtoken_a08ccbef - - + + public.AllocationToken - - + + [table] - + token - + - + text not null - + update_timestamp - + - + timestamptz - + allowed_registrar_ids - + - + _text - + allowed_tlds - + - + _text - + creation_time - + - + timestamptz not null - + discount_fraction - + - + float8(17, 17) not null - + discount_premiums - + - + bool not null - + discount_years - + - + int4 not null - + domain_name - + - + text - + redemption_history_entry - + - + text - + token_status_transitions - + - + "hstore" - + token_type - + - + text - + billingcancellation_6eedf614 - - + + public.BillingCancellation - - + + [table] - + billing_cancellation_id - + - + int8 not null - + registrar_id - + - + text not null - + domain_history_revision_id - + - + int8 not null - + domain_repo_id - + - + text not null - + event_time - + - + timestamptz not null - + flags - + - + _text - + reason - + - + text not null - + domain_name - + - + text not null - + billing_time - + - + timestamptz - + billing_event_id - + - + int8 - + billing_recurrence_id - + - + int8 - + billingevent_a57d1815 - - + + public.BillingEvent - - + + [table] - + billing_event_id - + - + int8 not null - + registrar_id - + - + text not null - + domain_history_revision_id - + - + int8 not null - + domain_repo_id - + - + text not null - + event_time - + - + timestamptz not null - + flags - + - + _text - + reason - + - + text not null - + domain_name - + - + text not null - + allocation_token_id - + - + text - + billing_time - + - + timestamptz - + cancellation_matching_billing_recurrence_id - + - + int8 - + cost_amount - + - + numeric(19, 2) - + cost_currency - + - + text - + period_years - + - + int4 - + synthetic_creation_time - + - + timestamptz - + billingcancellation_6eedf614:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_event_id billingrecurrence_5fa2cb01 - - + + public.BillingRecurrence - - + + [table] - + billing_recurrence_id - + - + int8 not null - + registrar_id - + - + text not null - + domain_history_revision_id - + - + int8 not null - + domain_repo_id - + - + text not null - + event_time - + - + timestamptz not null - + flags - + - + _text - + reason - + - + text not null - + domain_name - + - + text not null - + recurrence_end_time - + - + timestamptz - + recurrence_time_of_year - + - + text - + billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_recurrence_id - + registrar_6e1503e3 - - + + public.Registrar - - + + [table] - + registrar_id - + - + text not null - + allowed_tlds - + - + _text - + billing_account_map - + - + "hstore" - + billing_identifier - + - + int8 - + block_premium_names - + - + bool not null - + client_certificate - + - + text - + client_certificate_hash - + - + text - + contacts_require_syncing - + - + bool not null - + creation_time - + - + timestamptz - + drive_folder_id - + - + text - + email_address - + - + text - + failover_client_certificate - + - + text - + failover_client_certificate_hash - + - + text - + fax_number - + - + text - + iana_identifier - + - + int8 - + icann_referral_email - + - + text - + i18n_address_city - + - + text - + i18n_address_country_code - + - + text - + i18n_address_state - + - + text - + i18n_address_street_line1 - + - + text - + i18n_address_street_line2 - + - + text - + i18n_address_street_line3 - + - + text - + i18n_address_zip - + - + text - + ip_address_allow_list - + - + _text - + last_certificate_update_time - + - + timestamptz - + last_update_time - + - + timestamptz - + localized_address_city - + - + text - + localized_address_country_code - + - + text - + localized_address_state - + - + text - + localized_address_street_line1 - + - + text - + localized_address_street_line2 - + - + text - + localized_address_street_line3 - + - + text - + localized_address_zip - + - + text - + password_hash - + - + text - + phone_number - + - + text - + phone_passcode - + - + text - + po_number - + - + text - + rdap_base_urls - + - + _text - + registrar_name - + - + text not null - + registry_lock_allowed - + - + bool not null - + password_salt - + - + text - + state - + - + text - + type - + - + text not null - + url - + - + text - + whois_server - + - + text - + - + billingcancellation_6eedf614:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_billing_cancellation_registrar_id domain_6c51cffa - - + + public.Domain - - + + [table] - + repo_id - + - + text not null - + creation_registrar_id - + - + text not null - + creation_time - + - + timestamptz not null - + current_sponsor_registrar_id - + - + text not null - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + auth_info_repo_id - + - + text - + auth_info_value - + - + text - + domain_name - + - + text - + idn_table_name - + - + text - + last_transfer_time - + - + timestamptz - + launch_notice_accepted_time - + - + timestamptz - + launch_notice_expiration_time - + - + timestamptz - + launch_notice_tcn_id - + - + text - + launch_notice_validator_id - + - + text - + registration_expiration_time - + - + timestamptz - + smd_id - + - + text - + subordinate_hosts - + - + _text - + tld - + - + text - + admin_contact - + - + text - + billing_contact - + - + text - + registrant_contact - + - + text - + tech_contact - + - + text - + transfer_gaining_poll_message_id - + - + int8 - + transfer_losing_poll_message_id - + - + int8 - + transfer_billing_cancellation_id - + - + int8 - + transfer_billing_event_id - + - + int8 - + transfer_billing_recurrence_id - + - + int8 - + transfer_autorenew_poll_message_id - + - + int8 - + transfer_renew_period_unit - + - + text - + transfer_renew_period_value - + - + int4 - + transfer_client_txn_id - + - + text - + transfer_server_txn_id - + - + text - + transfer_registration_expiration_time - + - + timestamptz - + transfer_gaining_registrar_id - + - + text - + transfer_losing_registrar_id - + - + text - + transfer_pending_expiration_time - + - + timestamptz - + transfer_request_time - + - + timestamptz - + transfer_status - + - + text - + update_timestamp - + - + timestamptz - + billing_recurrence_id - + - + int8 - + autorenew_poll_message_id - + - + int8 - + deletion_poll_message_id - + - + int8 - + autorenew_end_time - + - + timestamptz - + billing_recurrence_history_id - + - + int8 - + autorenew_poll_message_history_id - + - + int8 - + deletion_poll_message_history_id - + - + int8 - + transfer_billing_recurrence_history_id - + - + int8 - + transfer_autorenew_poll_message_history_id - + - + int8 - + transfer_billing_event_history_id - + - + int8 - + domain_6c51cffa:w->billingcancellation_6eedf614:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_cancellation_id domain_6c51cffa:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_event_id domain_6c51cffa:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_domain_billing_recurrence_id domain_6c51cffa:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_recurrence_id contact_8de8cb16 - - + + public.Contact - - + + [table] - + repo_id - + - + text not null - + creation_registrar_id - + - + text not null - + creation_time - + - + timestamptz not null - + current_sponsor_registrar_id - + - + text not null - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + auth_info_repo_id - + - + text - + auth_info_value - + - + text - + contact_id - + - + text - + disclose_types_addr - + - + _text - + disclose_show_email - + - + bool - + disclose_show_fax - + - + bool - + disclose_mode_flag - + - + bool - + disclose_types_name - + - + _text - + disclose_types_org - + - + _text - + disclose_show_voice - + - + bool - + email - + - + text - + fax_phone_extension - + - + text - + fax_phone_number - + - + text - + addr_i18n_city - + - + text - + addr_i18n_country_code - + - + text - + addr_i18n_state - + - + text - + addr_i18n_street_line1 - + - + text - + addr_i18n_street_line2 - + - + text - + addr_i18n_street_line3 - + - + text - + addr_i18n_zip - + - + text - + addr_i18n_name - + - + text - + addr_i18n_org - + - + text - + addr_i18n_type - + - + text - + last_transfer_time - + - + timestamptz - + addr_local_city - + - + text - + addr_local_country_code - + - + text - + addr_local_state - + - + text - + addr_local_street_line1 - + - + text - + addr_local_street_line2 - + - + text - + addr_local_street_line3 - + - + text - + addr_local_zip - + - + text - + addr_local_name - + - + text - + addr_local_org - + - + text - + addr_local_type - + - + text - + search_name - + - + text - + voice_phone_extension - + - + text - + voice_phone_number - + - + text - + transfer_gaining_poll_message_id - + - + int8 - + transfer_losing_poll_message_id - + - + int8 - + transfer_client_txn_id - + - + text - + transfer_server_txn_id - + - + text - + transfer_gaining_registrar_id - + - + text - + transfer_losing_registrar_id - + - + text - + transfer_pending_expiration_time - + - + timestamptz - + transfer_request_time - + - + timestamptz - + transfer_status - + - + text - + update_timestamp - + - + timestamptz - + domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_admin_contact domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_billing_contact domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_registrant_contact domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_domain_tech_contact pollmessage_614a523e - - + + public.PollMessage - - + + [table] - + type - + - + text not null - + poll_message_id - + - + int8 not null - + registrar_id - + - + text not null - + contact_repo_id - + - + text - + contact_history_revision_id - + - + int8 - + domain_repo_id - + - + text - + domain_history_revision_id - + - + int8 - + event_time - + - + timestamptz not null - + host_repo_id - + - + text - + host_history_revision_id - + - + int8 - + message - + - + text - + transfer_response_contact_id - + - + text - + transfer_response_domain_expiration_time - + - + timestamptz - + transfer_response_domain_name - + - + text - + pending_action_response_action_result - + - + bool - + pending_action_response_name_or_id - + - + text - + pending_action_response_processed_date - + - + timestamptz - + pending_action_response_client_txn_id - + - + text - + pending_action_response_server_txn_id - + - + text - + transfer_response_gaining_registrar_id - + - + text - + transfer_response_losing_registrar_id - + - + text - + transfer_response_pending_transfer_expiration_time - + - + timestamptz - + transfer_response_transfer_request_time - + - + timestamptz - + transfer_response_transfer_status - + - + text - + autorenew_end_time - + - + timestamptz - + autorenew_domain_name - + - + text - + - + domain_6c51cffa:w->pollmessage_614a523e:e - - - - - - - - + + + + + + + + fk_domain_autorenew_poll_message_id - + domain_6c51cffa:w->pollmessage_614a523e:e - - - - - - - - + + + + + + + + fk_domain_deletion_poll_message_id - - domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fk2jc69qyg2tv9hhnmif6oa1cx1 - - - - domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fk2u3srsfbei272093m3b3xwj23 - - domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fkjc0r9r5y1lfbt4gpbqw4wsuvq + + + + + + + + + fk2jc69qyg2tv9hhnmif6oa1cx1 domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - - fk_domain_transfer_gaining_registrar_id + + + + + + + + + fk2u3srsfbei272093m3b3xwj23 domain_6c51cffa:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + + fkjc0r9r5y1lfbt4gpbqw4wsuvq + + + + domain_6c51cffa:w->registrar_6e1503e3:e + + + + + + + + + fk_domain_transfer_gaining_registrar_id + + + + domain_6c51cffa:w->registrar_6e1503e3:e + + + + + + + + fk_domain_transfer_losing_registrar_id billingevent_a57d1815:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_event_cancellation_matching_billing_recurrence_id - + billingevent_a57d1815:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_billing_event_registrar_id graceperiod_cd3b2e8f - - + + public.GracePeriod - - + + [table] - + id - + - + int8 not null - + billing_event_id - + - + int8 - + billing_recurrence_id - + - + int8 - + registrar_id - + - + text not null - + domain_repo_id - + - + text not null - + expiration_time - + - + timestamptz not null - + type - + - + text not null - + billing_event_history_id - + - + int8 - + billing_recurrence_history_id - + - + int8 - + graceperiod_cd3b2e8f:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_grace_period_domain_repo_id graceperiod_cd3b2e8f:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_grace_period_billing_event_id graceperiod_cd3b2e8f:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_grace_period_billing_recurrence_id - + billingrecurrence_5fa2cb01:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_billing_recurrence_registrar_id claimsentry_105da9f1 - - + + public.ClaimsEntry - - + + [table] - + revision_id - + - + int8 not null - + claim_key - + - + text not null - + domain_label - + - + text not null - + claimslist_3d49bc2b - - + + public.ClaimsList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + creation_timestamp - + - + timestamptz not null - + tmdb_generation_time - + - + timestamptz not null - + claimsentry_105da9f1:w->claimslist_3d49bc2b:e - - - - - - - - + + + + + + + + fk6sc6at5hedffc0nhdcab6ivuq - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk1sfyj7o7954prbn1exk7lpnoe - - - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk93c185fx7chn68uv7nl6uv2s0 - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fkmb7tdiv85863134w1wogtxrb2 + + + + + + + + + fk1sfyj7o7954prbn1exk7lpnoe contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk_contact_transfer_gaining_registrar_id + + + + + + + + + fk93c185fx7chn68uv7nl6uv2s0 contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + + fkmb7tdiv85863134w1wogtxrb2 + + + + contact_8de8cb16:w->registrar_6e1503e3:e + + + + + + + + + fk_contact_transfer_gaining_registrar_id + + + + contact_8de8cb16:w->registrar_6e1503e3:e + + + + + + + + fk_contact_transfer_losing_registrar_id contacthistory_d2964f8a - - + + public.ContactHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_by_superuser - + - + bool not null - + history_registrar_id - + - + text - + history_modification_time - + - + timestamptz not null - + history_reason - + - + text - + history_requested_by_registrar - + - + bool not null - + history_client_transaction_id - + - + text - + history_server_transaction_id - + - + text - + history_type - + - + text not null - + history_xml_bytes - + - + bytea not null - + auth_info_repo_id - + - + text - + auth_info_value - + - + text - + contact_id - + - + text - + disclose_types_addr - + - + _text - + disclose_show_email - + - + bool - + disclose_show_fax - + - + bool - + disclose_mode_flag - + - + bool - + disclose_types_name - + - + _text - + disclose_types_org - + - + _text - + disclose_show_voice - + - + bool - + email - + - + text - + fax_phone_extension - + - + text - + fax_phone_number - + - + text - + addr_i18n_city - + - + text - + addr_i18n_country_code - + - + text - + addr_i18n_state - + - + text - + addr_i18n_street_line1 - + - + text - + addr_i18n_street_line2 - + - + text - + addr_i18n_street_line3 - + - + text - + addr_i18n_zip - + - + text - + addr_i18n_name - + - + text - + addr_i18n_org - + - + text - + addr_i18n_type - + - + text - + last_transfer_time - + - + timestamptz - + addr_local_city - + - + text - + addr_local_country_code - + - + text - + addr_local_state - + - + text - + addr_local_street_line1 - + - + text - + addr_local_street_line2 - + - + text - + addr_local_street_line3 - + - + text - + addr_local_zip - + - + text - + addr_local_name - + - + text - + addr_local_org - + - + text - + addr_local_type - + - + text - + search_name - + - + text - + transfer_gaining_poll_message_id - + - + int8 - + transfer_losing_poll_message_id - + - + int8 - + transfer_client_txn_id - + - + text - + transfer_server_txn_id - + - + text - + transfer_gaining_registrar_id - + - + text - + transfer_losing_registrar_id - + - + text - + transfer_pending_expiration_time - + - + timestamptz - + transfer_request_time - + - + timestamptz - + transfer_status - + - + text - + voice_phone_extension - + - + text - + voice_phone_number - + - + text - + creation_registrar_id - + - + text - + creation_time - + - + timestamptz - + current_sponsor_registrar_id - + - + text - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + contact_repo_id - + - + text not null - + update_timestamp - + - + timestamptz - + contacthistory_d2964f8a:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_contact_history_contact_repo_id - + contacthistory_d2964f8a:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_contact_history_registrar_id pollmessage_614a523e:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_poll_message_domain_repo_id pollmessage_614a523e:w->contact_8de8cb16:e - - - - - - - - + + + + + + + + fk_poll_message_contact_repo_id pollmessage_614a523e:w->contacthistory_d2964f8a:e - - - - - - - - + + + + + + + + fk_poll_message_contact_history pollmessage_614a523e:w->contacthistory_d2964f8a:e - - - - - - - - + + + + + + + + fk_poll_message_contact_history domainhistory_a54cc226 - - + + public.DomainHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_by_superuser - + - + bool not null - + history_registrar_id - + - + text - + history_modification_time - + - + timestamptz not null - + history_reason - + - + text - + history_requested_by_registrar - + - + bool not null - + history_client_transaction_id - + - + text - + history_server_transaction_id - + - + text - + history_type - + - + text not null - + history_xml_bytes - + - + bytea not null - + admin_contact - + - + text - + auth_info_repo_id - + - + text - + auth_info_value - + - + text - + billing_recurrence_id - + - + int8 - + autorenew_poll_message_id - + - + int8 - + billing_contact - + - + text - + deletion_poll_message_id - + - + int8 - + domain_name - + - + text - + idn_table_name - + - + text - + last_transfer_time - + - + timestamptz - + launch_notice_accepted_time - + - + timestamptz - + launch_notice_expiration_time - + - + timestamptz - + launch_notice_tcn_id - + - + text - + launch_notice_validator_id - + - + text - + registrant_contact - + - + text - + registration_expiration_time - + - + timestamptz - + smd_id - + - + text - + subordinate_hosts - + - + _text - + tech_contact - + - + text - + tld - + - + text - + transfer_billing_cancellation_id - + - + int8 - + transfer_billing_recurrence_id - + - + int8 - + transfer_autorenew_poll_message_id - + - + int8 - + transfer_billing_event_id - + - + int8 - + transfer_renew_period_unit - + - + text - + transfer_renew_period_value - + - + int4 - + transfer_registration_expiration_time - + - + timestamptz - + transfer_gaining_poll_message_id - + - + int8 - + transfer_losing_poll_message_id - + - + int8 - + transfer_client_txn_id - + - + text - + transfer_server_txn_id - + - + text - + transfer_gaining_registrar_id - + - + text - + transfer_losing_registrar_id - + - + text - + transfer_pending_expiration_time - + - + timestamptz - + transfer_request_time - + - + timestamptz - + transfer_status - + - + text - + creation_registrar_id - + - + text - + creation_time - + - + timestamptz - + current_sponsor_registrar_id - + - + text - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + update_timestamp - + - + timestamptz - + domain_repo_id - + - + text not null - + autorenew_end_time - + - + timestamptz - + history_other_registrar_id - + - + text - + history_period_unit - + - + text - + history_period_value - + - + int4 - + billing_recurrence_history_id - + - + int8 - + autorenew_poll_message_history_id - + - + int8 - + deletion_poll_message_history_id - + - + int8 - + transfer_billing_recurrence_history_id - + - + int8 - + transfer_autorenew_poll_message_history_id - + - + int8 - + transfer_billing_event_history_id - + - + int8 - + - + pollmessage_614a523e:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fk_poll_message_domain_history - + pollmessage_614a523e:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fk_poll_message_domain_history host_f21b78de - - + + public.Host - - + + [table] - + repo_id - + - + text not null - + creation_registrar_id - + - + text - + creation_time - + - + timestamptz - + current_sponsor_registrar_id - + - + text - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + host_name - + - + text - + last_superordinate_change - + - + timestamptz - + last_transfer_time - + - + timestamptz - + superordinate_domain - + - + text - + inet_addresses - + - + _text - + update_timestamp - + - + timestamptz - + - + pollmessage_614a523e:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_poll_message_host_repo_id - + hosthistory_56210c2 - - + + public.HostHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_by_superuser - + - + bool not null - + history_registrar_id - + - + text not null - + history_modification_time - + - + timestamptz not null - + history_reason - + - + text - + history_requested_by_registrar - + - + bool not null - + history_client_transaction_id - + - + text - + history_server_transaction_id - + - + text - + history_type - + - + text not null - + history_xml_bytes - + - + bytea not null - + host_name - + - + text - + inet_addresses - + - + _text - + last_superordinate_change - + - + timestamptz - + last_transfer_time - + - + timestamptz - + superordinate_domain - + - + text - + creation_registrar_id - + - + text - + creation_time - + - + timestamptz - + current_sponsor_registrar_id - + - + text - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + host_repo_id - + - + text not null - + update_timestamp - + - + timestamptz - + - + pollmessage_614a523e:w->hosthistory_56210c2:e - - - - - - - - + + + + + + + + fk_poll_message_host_history - + pollmessage_614a523e:w->hosthistory_56210c2:e - - - - - - - - + + + + + + + + fk_poll_message_host_history - - pollmessage_614a523e:w->registrar_6e1503e3:e - - - - - - - - - fk_poll_message_registrar_id - - - - pollmessage_614a523e:w->registrar_6e1503e3:e - - - - - - - - - fk_poll_message_transfer_response_gaining_registrar_id - - pollmessage_614a523e:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + + fk_poll_message_registrar_id + + + + pollmessage_614a523e:w->registrar_6e1503e3:e + + + + + + + + + fk_poll_message_transfer_response_gaining_registrar_id + + + + pollmessage_614a523e:w->registrar_6e1503e3:e + + + + + + + + fk_poll_message_transfer_response_losing_registrar_id cursor_6af40e8c - - + + public."Cursor" - - + + [table] - + "scope" - + - + text not null - + type - + - + text not null - + cursor_time - + - + timestamptz not null - + last_update_time - + - + timestamptz not null - + delegationsignerdata_e542a872 - - + + public.DelegationSignerData - - + + [table] - + domain_repo_id - + - + text not null - + key_tag - + - + int4 not null - + algorithm - + - + int4 not null - + digest - + - + bytea not null - + digest_type - + - + int4 not null - + delegationsignerdata_e542a872:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fktr24j9v14ph2mfuw2gsmt12kq domainhistory_a54cc226:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_domain_history_domain_repo_id - + domainhistory_a54cc226:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk_domain_history_registrar_id domainhost_1ea127c2 - - + + public.DomainHost - - + + [table] - + domain_repo_id - + - + text not null - + host_repo_id - + - + text - + domainhost_1ea127c2:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fkfmi7bdink53swivs390m2btxg - + domainhost_1ea127c2:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_domainhost_host_valid host_f21b78de:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_host_superordinate_domain - + - domainhistoryhost_9f3f23ee - - - public.DomainHistoryHost + domaindsdatahistory_995b060d + + + public.DomainDsDataHistory - - + + [table] - - domain_history_history_revision_id + + ds_data_history_revision_id - + - + int8 not null - - host_repo_id + + algorithm - + - + + int4 not null + + + digest + + + + + bytea not null + + + digest_type + + + + + int4 not null + + + domain_history_revision_id + + + + + int8 not null + + + key_tag + + + + + int4 not null + + + domain_repo_id + + + + text - + + + + domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e + + + + + + + + + fko4ilgyyfnvppbpuivus565i0j + + + + domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e + + + + + + + + + fko4ilgyyfnvppbpuivus565i0j + + + + domainhistoryhost_9f3f23ee + + + public.DomainHistoryHost + + + + [table] + + + domain_history_history_revision_id + + + + + int8 not null + + + host_repo_id + + + + + text + + domain_history_domain_repo_id - + - + text not null - + - + domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fka9woh3hu8gx5x0vly6bai327n - + domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fka9woh3hu8gx5x0vly6bai327n - + domaintransactionrecord_6e77ff61 - - + + public.DomainTransactionRecord - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + report_amount - + - + int4 not null - + report_field - + - + text not null - + reporting_time - + - + timestamptz not null - + tld - + - + text not null - + domain_repo_id - + - + text - + history_revision_id - + - + int8 - + - + domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fkcjqe54u72kha71vkibvxhjye7 - + domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fkcjqe54u72kha71vkibvxhjye7 - + hosthistory_56210c2:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_hosthistory_host - + hosthistory_56210c2:w->registrar_6e1503e3:e - - - - - - - - + + + + + + + + fk3d09knnmxrt6iniwnp8j2ykga - + lock_f21d4861 - - + + public.Lock - - + + [table] - + resource_name - + - + text not null - + tld - + - + text not null - + acquired_time - + - + timestamptz not null - + expiration_time - + - + timestamptz not null - + request_log_id - + - + text not null - + - + premiumentry_b0060b91 - - + + public.PremiumEntry - - + + [table] - + revision_id - + - + int8 not null - + price - + - + numeric(19, 2) not null - + domain_label - + - + text not null - + - + premiumlist_7c3ea68b - - + + public.PremiumList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + creation_timestamp - + - + timestamptz not null - + name - + - + text not null - + bloom_filter - + - + bytea not null - + currency - + - + text not null - + - + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 - + rderevision_83396864 - - + + public.RdeRevision - - + + [table] - + tld - + - + text not null - + mode - + - + text not null - + "date" - + - + date not null - + update_timestamp - + - + timestamptz - + revision - + - + int4 not null - + - + registrarpoc_ab47054d - - + + public.RegistrarPoc - - + + [table] - + email_address - + - + text not null - + allowed_to_set_registry_lock_password - + - + bool not null - + fax_number - + - + text - + gae_user_id - + - + text - + name - + - + text - + phone_number - + - + text - + registry_lock_password_hash - + - + text - + registry_lock_password_salt - + - + text - + types - + - + _text - + visible_in_domain_whois_as_abuse - + - + bool not null - + visible_in_whois_as_admin - + - + bool not null - + visible_in_whois_as_tech - + - + bool not null - + registry_lock_email_address - + - + text - + registrar_id - + - + text not null - + - + registrylock_ac88663e - - + + public.RegistryLock - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + lock_completion_timestamp - + - + timestamptz - + lock_request_timestamp - + - + timestamptz not null - + domain_name - + - + text not null - + is_superuser - + - + bool not null - + registrar_id - + - + text not null - + registrar_poc_id - + - + text - + repo_id - + - + text not null - + verification_code - + - + text not null - + unlock_request_timestamp - + - + timestamptz - + unlock_completion_timestamp - + - + timestamptz - + last_update_timestamp - + - + timestamptz - + relock_revision_id - + - + int8 - + relock_duration - + - + interval - + - + registrylock_ac88663e:w->registrylock_ac88663e:e - - - - - - - - + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 - + reservedentry_1a7b8520 - - + + public.ReservedEntry - - + + [table] - + revision_id - + - + int8 not null - + comment - + - + text - + reservation_type - + - + int4 not null - + domain_label - + - + text not null - + - + reservedlist_b97c3f1c - - + + public.ReservedList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + creation_timestamp - + - + timestamptz not null - + name - + - + text not null - + should_publish - + - + bool not null - + - + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc - + spec11threatmatch_a61228a6 - - + + public.Spec11ThreatMatch - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + check_date - + - + date not null - + domain_name - + - + text not null - + domain_repo_id - + - + text not null - + registrar_id - + - + text not null - + threat_types - + - + _text not null - + tld - + - + text not null - + - + tld_f1fa57e2 - - + + public.Tld - - + + [table] - + tld_name - + - + text not null - + add_grace_period_length - + - + interval not null - + allowed_fully_qualified_host_names - + - + _text - + allowed_registrant_contact_ids - + - + _text - + anchor_tenant_add_grace_period_length - + - + interval not null - + auto_renew_grace_period_length - + - + interval not null - + automatic_transfer_length - + - + interval not null - + claims_period_end - + - + timestamptz not null - + create_billing_cost_amount - + - + numeric(19, 2) - + create_billing_cost_currency - + - + text - + creation_time - + - + timestamptz not null - + currency - + - + text not null - + dns_paused - + - + bool not null - + dns_writers - + - + _text not null - + drive_folder_id - + - + text - + eap_fee_schedule - + - + "hstore" not null - + escrow_enabled - + - + bool not null - + invoicing_enabled - + - + bool not null - + lordn_username - + - + text - + num_dns_publish_locks - + - + int4 not null - + pending_delete_length - + - + interval not null - + premium_list_name - + - + text - + pricing_engine_class_name - + - + text - + redemption_grace_period_length - + - + interval not null - + registry_lock_or_unlock_cost_amount - + - + numeric(19, 2) - + registry_lock_or_unlock_cost_currency - + - + text - + renew_billing_cost_transitions - + - + "hstore" not null - + renew_grace_period_length - + - + interval not null - + reserved_list_names - + - + _text - + restore_billing_cost_amount - + - + numeric(19, 2) - + restore_billing_cost_currency - + - + text - + roid_suffix - + - + text - + server_status_change_billing_cost_amount - + - + numeric(19, 2) - + server_status_change_billing_cost_currency - + - + text - + tld_state_transitions - + - + "hstore" not null - + tld_type - + - + text not null - + tld_unicode - + - + text not null - + transfer_grace_period_length - + - + interval not null - + - + transaction_d50389d4 - - + + public.Transaction - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + contents - + - + bytea - + @@ -7723,17 +7817,17 @@ td.section {
- algorithm +
algorithm int4 not null - digest + digest bytea not null - digest_type + digest_type int4 not null @@ -7759,6 +7853,21 @@ td.section { key_tag + + + algorithm + + + + + digest_type + + + + + digest + + @@ -7812,6 +7921,21 @@ td.section { key_tag ascending + + + algorithm + ascending + + + + digest_type + ascending + + + + digest + ascending +

 

@@ -8448,6 +8572,107 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
public.DomainDsDataHistory [table] +
ds_data_history_revision_idint8 not null
algorithmint4 not null
digestbytea not null
digest_typeint4 not null
domain_history_revision_idint8 not null
key_tagint4 not null
domain_repo_idtext
Primary Key
DomainDsDataHistory_pkey[primary key]
ds_data_history_revision_id
Foreign Keys
fko4ilgyyfnvppbpuivus565i0j[foreign key, with no action]
domain_repo_id (0..many)→ public.DomainHistory.domain_repo_id
domain_history_revision_id (0..many)→ public.DomainHistory.history_revision_id
Indexes
DomainDsDataHistory_pkey[unique index]
ds_data_history_revision_idascending
+

 

@@ -8833,6 +9058,23 @@ td.section { + + + + + + + + + + + + + + + + + diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index ef6b1d762..7d27ba881 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -66,3 +66,4 @@ V65__local_date_date_type.sql V66__create_rde_revision.sql V67__grace_period_history_ids.sql V68__make_reserved_list_nullable_in_registry.sql +V69__change_primary_key_and_add_history_table_for_delegation_signer.sql diff --git a/db/src/main/resources/sql/flyway/V69__change_primary_key_and_add_history_table_for_delegation_signer.sql b/db/src/main/resources/sql/flyway/V69__change_primary_key_and_add_history_table_for_delegation_signer.sql new file mode 100644 index 000000000..d9be41c0a --- /dev/null +++ b/db/src/main/resources/sql/flyway/V69__change_primary_key_and_add_history_table_for_delegation_signer.sql @@ -0,0 +1,35 @@ +-- 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 "DelegationSignerData" drop constraint "DelegationSignerData_pkey"; + +alter table "DelegationSignerData" + add constraint "DelegationSignerData_pkey" + primary key (domain_repo_id, key_tag, algorithm, digest_type, digest); + +create table "DomainDsDataHistory" ( + ds_data_history_revision_id int8 not null, + algorithm int4 not null, + digest bytea not null, + digest_type int4 not null, + domain_history_revision_id int8 not null, + key_tag int4 not null, + domain_repo_id text, + primary key (ds_data_history_revision_id) +); + +alter table if exists "DomainDsDataHistory" + add constraint FKo4ilgyyfnvppbpuivus565i0j + foreign key (domain_repo_id, domain_history_revision_id) + references "DomainHistory"; diff --git a/db/src/main/resources/sql/schema/db-schema.sql.generated b/db/src/main/resources/sql/schema/db-schema.sql.generated index 4b6771eff..dddd0fd20 100644 --- a/db/src/main/resources/sql/schema/db-schema.sql.generated +++ b/db/src/main/resources/sql/schema/db-schema.sql.generated @@ -227,12 +227,12 @@ ); create table "DelegationSignerData" ( - domain_repo_id text not null, - key_tag int4 not null, - algorithm int4 not null, + algorithm int4 not null, digest bytea not null, digest_type int4 not null, - primary key (domain_repo_id, key_tag) + domain_repo_id text not null, + key_tag int4 not null, + primary key (algorithm, digest, digest_type, domain_repo_id, key_tag) ); create table "Domain" ( @@ -291,6 +291,17 @@ primary key (repo_id) ); + create table "DomainDsDataHistory" ( + ds_data_history_revision_id int8 not null, + algorithm int4 not null, + digest bytea not null, + digest_type int4 not null, + domain_history_revision_id int8 not null, + domain_repo_id text, + key_tag int4 not null, + primary key (ds_data_history_revision_id) + ); + create table "DomainHistory" ( domain_repo_id text not null, history_revision_id int8 not null, @@ -729,6 +740,11 @@ create index spec11threatmatch_check_date_idx on "Spec11ThreatMatch" (check_date foreign key (domain_repo_id) references "Domain"; + alter table if exists "DomainDsDataHistory" + add constraint FKo4ilgyyfnvppbpuivus565i0j + foreign key (domain_repo_id, domain_history_revision_id) + references "DomainHistory"; + alter table if exists "DomainHistoryHost" add constraint FKa9woh3hu8gx5x0vly6bai327n foreign key (domain_history_domain_repo_id, domain_history_history_revision_id) diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 7e2286bcd..26ef82190 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -376,6 +376,21 @@ CREATE TABLE public."Domain" ( ); +-- +-- Name: DomainDsDataHistory; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."DomainDsDataHistory" ( + ds_data_history_revision_id bigint NOT NULL, + algorithm integer NOT NULL, + digest bytea NOT NULL, + digest_type integer NOT NULL, + domain_history_revision_id bigint NOT NULL, + key_tag integer NOT NULL, + domain_repo_id text +); + + -- -- Name: DomainHistory; Type: TABLE; Schema: public; Owner: - -- @@ -1072,7 +1087,15 @@ ALTER TABLE ONLY public."Cursor" -- ALTER TABLE ONLY public."DelegationSignerData" - ADD CONSTRAINT "DelegationSignerData_pkey" PRIMARY KEY (domain_repo_id, key_tag); + ADD CONSTRAINT "DelegationSignerData_pkey" PRIMARY KEY (domain_repo_id, key_tag, algorithm, digest_type, digest); + + +-- +-- Name: DomainDsDataHistory DomainDsDataHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."DomainDsDataHistory" + ADD CONSTRAINT "DomainDsDataHistory_pkey" PRIMARY KEY (ds_data_history_revision_id); -- @@ -2016,6 +2039,14 @@ ALTER TABLE ONLY public."PremiumEntry" ADD CONSTRAINT fko0gw90lpo1tuee56l0nb6y6g5 FOREIGN KEY (revision_id) REFERENCES public."PremiumList"(revision_id); +-- +-- Name: DomainDsDataHistory fko4ilgyyfnvppbpuivus565i0j; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."DomainDsDataHistory" + ADD CONSTRAINT fko4ilgyyfnvppbpuivus565i0j FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id); + + -- -- Name: DelegationSignerData fktr24j9v14ph2mfuw2gsmt12kq; Type: FK CONSTRAINT; Schema: public; Owner: - --
public.DomainHistory [table]
fko4ilgyyfnvppbpuivus565i0j[foreign key, with no action]
domain_repo_id ←(0..many) public.DomainDsDataHistory.domain_repo_id
history_revision_id ←(0..many) public.DomainDsDataHistory.domain_history_revision_id
fka9woh3hu8gx5x0vly6bai327n [foreign key, with no action]