Convert TmchCrl and ServerSecret to cleaner tm() impls (#1068)

* Convert TmchCrl and ServerSecret to cleaner tm() impls

When I implemented this originally I knew a lot less than I know now
about how we'll be storing and retrieving these singletons from SQL. The
optimal way here is to use the single SINGLETON_ID as the primary key,
that way we always know how to create the key that we can use in the
tm() retrieval.

This allows us to use generic tm() methods and to remove the handcrafted
SQL queries.
This commit is contained in:
gbrodman 2021-04-13 20:50:07 -04:00 committed by GitHub
parent 7918d7cd46
commit c81cbcc1bb
11 changed files with 285 additions and 343 deletions

View file

@ -31,7 +31,7 @@ public abstract class CrossTldSingleton extends ImmutableObject {
public static final long SINGLETON_ID = 1; // There is always exactly one of these.
@Id @Transient long id = SINGLETON_ID;
@Id @javax.persistence.Id long id = SINGLETON_ID;
@Transient @Parent Key<EntityGroupRoot> parent = getCrossTldKey();
}

View file

@ -15,8 +15,6 @@
package google.registry.model.server;
import static google.registry.model.common.EntityGroupRoot.getCrossTldKey;
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
import static google.registry.persistence.transaction.TransactionManagerFactory.ofyTm;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import com.google.common.annotations.VisibleForTesting;
@ -35,10 +33,10 @@ import google.registry.model.common.CrossTldSingleton;
import google.registry.persistence.VKey;
import google.registry.schema.replay.NonReplicatedEntity;
import java.nio.ByteBuffer;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.PostLoad;
import javax.persistence.Transient;
@ -67,22 +65,28 @@ public class ServerSecret extends CrossTldSingleton implements NonReplicatedEnti
});
private static ServerSecret retrieveAndSaveSecret() {
VKey<ServerSecret> key =
VKey<ServerSecret> vkey =
VKey.create(
ServerSecret.class,
SINGLETON_ID,
Key.create(getCrossTldKey(), ServerSecret.class, SINGLETON_ID));
if (tm().isOfy()) {
// Attempt a quick load if we're in ofy first to short-circuit sans transaction
Optional<ServerSecret> secretWithoutTransaction = tm().loadByKeyIfPresent(vkey);
if (secretWithoutTransaction.isPresent()) {
return secretWithoutTransaction.get();
}
}
return tm().transact(
() -> {
// transactionally create a new ServerSecret (once per app setup) if necessary.
// return the ofy() result during Datastore-primary phase
ServerSecret secret =
ofyTm().loadByKeyIfPresent(key).orElseGet(() -> create(UUID.randomUUID()));
// During a dual-write period, write it to both Datastore and SQL
// even if we didn't have to retrieve it from the DB
ofyTm().transact(() -> ofyTm().putWithoutBackup(secret));
jpaTm().transact(() -> jpaTm().putWithoutBackup(secret));
return secret;
// Make sure we're in a transaction and attempt to load any existing secret, then
// create it if it's absent.
Optional<ServerSecret> secret = tm().loadByKeyIfPresent(vkey);
if (!secret.isPresent()) {
secret = Optional.of(create(UUID.randomUUID()));
tm().insertWithoutBackup(secret.get());
}
return secret.get();
});
}
@ -102,7 +106,6 @@ public class ServerSecret extends CrossTldSingleton implements NonReplicatedEnti
@Transient long leastSignificant;
/** The UUID value itself. */
@Id
@Column(columnDefinition = "uuid")
@Ignore
UUID secret;

View file

@ -25,15 +25,11 @@ import com.googlecode.objectify.annotation.Entity;
import google.registry.model.annotations.NotBackedUp;
import google.registry.model.annotations.NotBackedUp.Reason;
import google.registry.model.common.CrossTldSingleton;
import google.registry.model.tmch.TmchCrl.TmchCrlId;
import google.registry.persistence.VKey;
import google.registry.schema.replay.NonReplicatedEntity;
import java.io.Serializable;
import java.util.Optional;
import javax.annotation.concurrent.Immutable;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.IdClass;
import org.joda.time.DateTime;
/** Datastore singleton for ICANN's TMCH CA certificate revocation list (CRL). */
@ -41,22 +37,26 @@ import org.joda.time.DateTime;
@javax.persistence.Entity
@Immutable
@NotBackedUp(reason = Reason.EXTERNALLY_SOURCED)
@IdClass(TmchCrlId.class)
public final class TmchCrl extends CrossTldSingleton implements NonReplicatedEntity {
@Id String crl;
@Column(name = "certificateRevocations", nullable = false)
String crl;
@Id DateTime updated;
@Column(name = "updateTimestamp", nullable = false)
DateTime updated;
@Id String url;
@Column(nullable = false)
String url;
/** Returns the singleton instance of this entity, without memoization. */
public static Optional<TmchCrl> get() {
VKey<TmchCrl> key =
VKey.create(
TmchCrl.class, SINGLETON_ID, Key.create(getCrossTldKey(), TmchCrl.class, SINGLETON_ID));
// return the ofy() result during Datastore-primary phase
return ofyTm().transact(() -> ofyTm().loadByKeyIfPresent(key));
return tm().transact(
() ->
tm().loadByKeyIfPresent(
VKey.create(
TmchCrl.class,
SINGLETON_ID,
Key.create(getCrossTldKey(), TmchCrl.class, SINGLETON_ID))));
}
/**
@ -75,13 +75,7 @@ public final class TmchCrl extends CrossTldSingleton implements NonReplicatedEnt
tmchCrl.crl = checkNotNull(crl, "crl");
tmchCrl.url = checkNotNull(url, "url");
ofyTm().transactNew(() -> ofyTm().putWithoutBackup(tmchCrl));
jpaTm()
.transactNew(
() -> {
// Delete the old one and insert the new one
jpaTm().query("DELETE FROM TmchCrl").executeUpdate();
jpaTm().putWithoutBackup(tmchCrl);
});
jpaTm().transactNew(() -> jpaTm().putWithoutBackup(tmchCrl));
});
}
@ -99,26 +93,4 @@ public final class TmchCrl extends CrossTldSingleton implements NonReplicatedEnt
public final DateTime getUpdated() {
return updated;
}
static class TmchCrlId implements Serializable {
@Column(name = "certificateRevocations")
String crl;
@Column(name = "updateTimestamp")
DateTime updated;
String url;
/** Hibernate requires this default constructor. */
private TmchCrlId() {}
static TmchCrlId create(String crl, DateTime updated, String url) {
TmchCrlId result = new TmchCrlId();
result.crl = crl;
result.updated = updated;
result.url = url;
return result;
}
}
}

View file

@ -15,16 +15,19 @@
package google.registry.model.server;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
import static google.registry.testing.DatabaseHelper.loadByEntity;
import static google.registry.testing.DatabaseHelper.persistResource;
import google.registry.model.EntityTestCase;
import google.registry.model.ofy.RequestCapturingAsyncDatastoreService;
import google.registry.testing.DualDatabaseTest;
import google.registry.testing.TestOfyAndSql;
import google.registry.testing.TestOfyOnly;
import java.util.UUID;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/** Unit tests for {@link ServerSecret}. */
@DualDatabaseTest
public class ServerSecretTest extends EntityTestCase {
ServerSecretTest() {
@ -36,24 +39,22 @@ public class ServerSecretTest extends EntityTestCase {
ServerSecret.resetCache();
}
@Test
@TestOfyAndSql
void testGet_bootstrapping_savesSecretToDatastore() {
ServerSecret secret = ServerSecret.get();
assertThat(secret).isNotNull();
assertThat(ofy().load().entity(new ServerSecret()).now()).isEqualTo(secret);
assertThat(loadFromSql()).isEqualTo(secret);
assertThat(loadByEntity(new ServerSecret())).isEqualTo(secret);
}
@Test
@TestOfyAndSql
void testGet_existingSecret_returned() {
ServerSecret secret = ServerSecret.create(new UUID(123, 456));
ofy().saveWithoutBackup().entity(secret).now();
persistResource(secret);
assertThat(ServerSecret.get()).isEqualTo(secret);
assertThat(ofy().load().entity(new ServerSecret()).now()).isEqualTo(secret);
assertThat(loadFromSql()).isEqualTo(secret);
assertThat(loadByEntity(new ServerSecret())).isEqualTo(secret);
}
@Test
@TestOfyOnly // relies on request-capturing datastore
void testGet_cachedSecret() {
int numInitialReads = RequestCapturingAsyncDatastoreService.getReads().size();
ServerSecret secret = ServerSecret.get();
@ -63,21 +64,9 @@ public class ServerSecretTest extends EntityTestCase {
assertThat(RequestCapturingAsyncDatastoreService.getReads()).hasSize(numReads);
}
@Test
@TestOfyAndSql
void testAsBytes() {
byte[] bytes = ServerSecret.create(new UUID(123, 0x456)).asBytes();
assertThat(bytes).isEqualTo(new byte[] {0, 0, 0, 0, 0, 0, 0, 123, 0, 0, 0, 0, 0, 0, 0x4, 0x56});
}
private static ServerSecret loadFromSql() {
return jpaTm()
.transact(
() ->
jpaTm()
.query("FROM ServerSecret", ServerSecret.class)
.setMaxResults(1)
.getResultStream()
.findFirst()
.get());
}
}

View file

@ -15,61 +15,43 @@
package google.registry.model.tmch;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.persistence.transaction.TransactionManagerFactory.jpaTm;
import static google.registry.testing.DatabaseHelper.loadByEntity;
import google.registry.model.EntityTestCase;
import google.registry.testing.DualDatabaseTest;
import google.registry.testing.TestOfyAndSql;
import java.util.Optional;
import org.junit.jupiter.api.Test;
/** Unit tests for {@link TmchCrl}. */
@DualDatabaseTest
public class TmchCrlTest extends EntityTestCase {
TmchCrlTest() {
super(JpaEntityCoverageCheck.ENABLED);
}
@Test
@TestOfyAndSql
void testSuccess() {
assertThat(TmchCrl.get()).isEqualTo(Optional.empty());
TmchCrl.set("lolcat", "https://lol.cat");
assertThat(TmchCrl.get().get().getCrl()).isEqualTo("lolcat");
}
@Test
@TestOfyAndSql
void testDualWrite() {
TmchCrl expected = new TmchCrl();
expected.crl = "lolcat";
expected.url = "https://lol.cat";
expected.updated = fakeClock.nowUtc();
TmchCrl.set("lolcat", "https://lol.cat");
assertThat(ofy().load().entity(new TmchCrl()).now()).isEqualTo(expected);
assertThat(loadFromSql()).isEqualTo(expected);
assertThat(loadByEntity(new TmchCrl())).isEqualTo(expected);
}
@Test
@TestOfyAndSql
void testMultipleWrites() {
TmchCrl.set("first", "https://first.cat");
assertThat(TmchCrl.get().get().getCrl()).isEqualTo("first");
TmchCrl.set("second", "https://second.cat");
assertThat(TmchCrl.get().get().getCrl()).isEqualTo("second");
jpaTm()
.transact(
() ->
assertThat(
jpaTm().query("SELECT COUNT(*) FROM TmchCrl", Long.class).getSingleResult())
.isEqualTo(1L));
}
private static TmchCrl loadFromSql() {
return jpaTm()
.transact(
() ->
jpaTm()
.query("FROM TmchCrl", TmchCrl.class)
.setMaxResults(1)
.getResultStream()
.findFirst()
.get());
}
}

View file

@ -261,19 +261,19 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2021-04-08 17:21:58.993542</td>
<td class="property_value">2021-04-12 17:28:08.926599</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
<td id="lastFlywayFile" class="property_value">V91__defer_fkeys.sql</td>
<td id="lastFlywayFile" class="property_value">V92__singletons.sql</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<svg viewbox="0.00 0.00 4221.44 2624.18" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"> <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 2620.18)">
<svg viewbox="0.00 0.00 4221.44 2586.18" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"> <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 2582.18)">
<title>SchemaCrawler_Diagram</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-2620.18 4217.44,-2620.18 4217.44,4 -4,4" />
<polygon fill="white" stroke="transparent" points="-4,4 -4,-2582.18 4217.44,-2582.18 4217.44,4 -4,4" />
<text text-anchor="start" x="3944.94" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">
generated by
</text>
@ -284,7 +284,7 @@ td.section {
generated on
</text>
<text text-anchor="start" x="4027.94" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">
2021-04-08 17:21:58.993542
2021-04-12 17:28:08.926599
</text>
<polygon fill="none" stroke="#888888" points="3940.44,-4 3940.44,-44 4205.44,-44 4205.44,-4 3940.44,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
@ -2849,23 +2849,23 @@ td.section {
</g> <!-- serversecret_6cc90f09 -->
<g id="node32" class="node">
<title>serversecret_6cc90f09</title>
<polygon fill="#ebcef2" stroke="transparent" points="3944.5,-2108.68 3944.5,-2127.68 4075.5,-2127.68 4075.5,-2108.68 3944.5,-2108.68" />
<text text-anchor="start" x="3946.5" y="-2115.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="3946.5,-2108.68 3946.5,-2127.68 4077.5,-2127.68 4077.5,-2108.68 3946.5,-2108.68" />
<text text-anchor="start" x="3948.5" y="-2115.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.ServerSecret
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4075.5,-2108.68 4075.5,-2127.68 4152.5,-2127.68 4152.5,-2108.68 4075.5,-2108.68" />
<text text-anchor="start" x="4113.5" y="-2114.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4077.5,-2108.68 4077.5,-2127.68 4151.5,-2127.68 4151.5,-2108.68 4077.5,-2108.68" />
<text text-anchor="start" x="4112.5" y="-2114.48" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="3946.5" y="-2096.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
secret
<text text-anchor="start" x="3948.5" y="-2096.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4029.5" y="-2095.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4018.5" y="-2095.48" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4077.5" y="-2095.48" font-family="Helvetica,sans-Serif" font-size="14.00">
uuid not null
<text text-anchor="start" x="4079.5" y="-2095.48" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<polygon fill="none" stroke="#888888" points="3943.5,-2088.68 3943.5,-2128.68 4153.5,-2128.68 4153.5,-2088.68 3943.5,-2088.68" />
<polygon fill="none" stroke="#888888" points="3945,-2088.68 3945,-2128.68 4152,-2128.68 4152,-2088.68 3945,-2088.68" />
</g> <!-- signedmarkrevocationentry_99c39721 -->
<g id="node33" class="node">
<title>signedmarkrevocationentry_99c39721</title>
@ -3004,64 +3004,48 @@ td.section {
</g> <!-- tmchcrl_d282355 -->
<g id="node38" class="node">
<title>tmchcrl_d282355</title>
<polygon fill="#ebcef2" stroke="transparent" points="3905.5,-2506.68 3905.5,-2525.68 4065.5,-2525.68 4065.5,-2506.68 3905.5,-2506.68" />
<text text-anchor="start" x="3907.5" y="-2513.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="3959.5,-2468.68 3959.5,-2487.68 4063.5,-2487.68 4063.5,-2468.68 3959.5,-2468.68" />
<text text-anchor="start" x="3961.5" y="-2475.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.TmchCrl
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4065.5,-2506.68 4065.5,-2525.68 4191.5,-2525.68 4191.5,-2506.68 4065.5,-2506.68" />
<text text-anchor="start" x="4152.5" y="-2512.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4063.5,-2468.68 4063.5,-2487.68 4137.5,-2487.68 4137.5,-2468.68 4063.5,-2468.68" />
<text text-anchor="start" x="4098.5" y="-2474.48" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="3907.5" y="-2494.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
certificate_revocations
<text text-anchor="start" x="3961.5" y="-2456.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4059.5" y="-2493.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4017.5" y="-2455.48" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4067.5" y="-2493.48" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
<text text-anchor="start" x="4065.5" y="-2455.48" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<text text-anchor="start" x="3907.5" y="-2475.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
update_timestamp
</text>
<text text-anchor="start" x="4059.5" y="-2474.48" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4067.5" y="-2474.48" font-family="Helvetica,sans-Serif" font-size="14.00">
timestamptz not null
</text>
<text text-anchor="start" x="3907.5" y="-2456.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
url
</text>
<text text-anchor="start" x="4059.5" y="-2455.48" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4067.5" y="-2455.48" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<polygon fill="none" stroke="#888888" points="3904.5,-2448.68 3904.5,-2526.68 4192.5,-2526.68 4192.5,-2448.68 3904.5,-2448.68" />
<polygon fill="none" stroke="#888888" points="3958.5,-2448.68 3958.5,-2488.68 4138.5,-2488.68 4138.5,-2448.68 3958.5,-2448.68" />
</g> <!-- transaction_d50389d4 -->
<g id="node39" class="node">
<title>transaction_d50389d4</title>
<polygon fill="#ebcef2" stroke="transparent" points="3931.5,-2591.68 3931.5,-2610.68 4056.5,-2610.68 4056.5,-2591.68 3931.5,-2591.68" />
<text text-anchor="start" x="3933.5" y="-2598.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="3931.5,-2553.68 3931.5,-2572.68 4056.5,-2572.68 4056.5,-2553.68 3931.5,-2553.68" />
<text text-anchor="start" x="3933.5" y="-2560.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.Transaction
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4056.5,-2591.68 4056.5,-2610.68 4166.5,-2610.68 4166.5,-2591.68 4056.5,-2591.68" />
<text text-anchor="start" x="4127.5" y="-2597.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4056.5,-2553.68 4056.5,-2572.68 4166.5,-2572.68 4166.5,-2553.68 4056.5,-2553.68" />
<text text-anchor="start" x="4127.5" y="-2559.48" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="3933.5" y="-2579.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="3933.5" y="-2541.48" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4000.5" y="-2578.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4000.5" y="-2540.48" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4058.5" y="-2578.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4058.5" y="-2540.48" font-family="Helvetica,sans-Serif" font-size="14.00">
bigserial not null
</text>
<text text-anchor="start" x="4000.5" y="-2559.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4000.5" y="-2521.48" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4058.5" y="-2559.48" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4058.5" y="-2521.48" font-family="Helvetica,sans-Serif" font-size="14.00">
auto-incremented
</text>
<polygon fill="none" stroke="#888888" points="3930,-2553.18 3930,-2612.18 4167,-2612.18 4167,-2553.18 3930,-2553.18" />
<polygon fill="none" stroke="#888888" points="3930,-2515.18 3930,-2574.18 4167,-2574.18 4167,-2515.18 3930,-2515.18" />
</g>
</g>
</svg>
@ -6427,8 +6411,8 @@ td.section {
<tbody>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>secret</i></b></td>
<td class="minwidth">uuid not null</td>
<td class="minwidth"><b><i>id</i></b></td>
<td class="minwidth">int8 not null</td>
</tr>
<tr>
<td colspan="3"></td>
@ -6445,7 +6429,7 @@ td.section {
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">secret</td>
<td class="minwidth">id</td>
<td class="minwidth"></td>
</tr>
</tbody>
@ -6708,18 +6692,8 @@ td.section {
<tbody>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>certificate_revocations</i></b></td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>update_timestamp</i></b></td>
<td class="minwidth">timestamptz not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>url</i></b></td>
<td class="minwidth">text not null</td>
<td class="minwidth"><b><i>id</i></b></td>
<td class="minwidth">int8 not null</td>
</tr>
<tr>
<td colspan="3"></td>
@ -6736,17 +6710,7 @@ td.section {
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">certificate_revocations</td>
<td class="minwidth"></td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">update_timestamp</td>
<td class="minwidth"></td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">url</td>
<td class="minwidth">id</td>
<td class="minwidth"></td>
</tr>
</tbody>

View file

@ -261,19 +261,19 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2021-04-08 17:21:56.891855</td>
<td class="property_value">2021-04-12 17:28:07.032036</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
<td id="lastFlywayFile" class="property_value">V91__defer_fkeys.sql</td>
<td id="lastFlywayFile" class="property_value">V92__singletons.sql</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<svg viewbox="0.00 0.00 4850.02 4862.91" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"> <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 4858.91)">
<svg viewbox="0.00 0.00 4850.02 4900.91" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"> <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 4896.91)">
<title>SchemaCrawler_Diagram</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-4858.91 4846.02,-4858.91 4846.02,4 -4,4" />
<polygon fill="white" stroke="transparent" points="-4,4 -4,-4896.91 4846.02,-4896.91 4846.02,4 -4,4" />
<text text-anchor="start" x="4573.52" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">
generated by
</text>
@ -284,7 +284,7 @@ td.section {
generated on
</text>
<text text-anchor="start" x="4656.52" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">
2021-04-08 17:21:56.891855
2021-04-12 17:28:07.032036
</text>
<polygon fill="none" stroke="#888888" points="4569.02,-4 4569.02,-44 4834.02,-44 4834.02,-4 4569.02,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
@ -6233,139 +6233,155 @@ td.section {
</g> <!-- serversecret_6cc90f09 -->
<g id="node32" class="node">
<title>serversecret_6cc90f09</title>
<polygon fill="#ebcef2" stroke="transparent" points="4548.5,-4233.91 4548.5,-4252.91 4679.5,-4252.91 4679.5,-4233.91 4548.5,-4233.91" />
<text text-anchor="start" x="4550.5" y="-4240.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4548.5,-4251.91 4548.5,-4270.91 4679.5,-4270.91 4679.5,-4251.91 4548.5,-4251.91" />
<text text-anchor="start" x="4550.5" y="-4258.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.ServerSecret
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4679.5,-4233.91 4679.5,-4252.91 4756.5,-4252.91 4756.5,-4233.91 4679.5,-4233.91" />
<text text-anchor="start" x="4717.5" y="-4239.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4679.5,-4251.91 4679.5,-4270.91 4756.5,-4270.91 4756.5,-4251.91 4679.5,-4251.91" />
<text text-anchor="start" x="4717.5" y="-4257.71" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="4550.5" y="-4221.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4550.5" y="-4238.71" font-family="Helvetica,sans-Serif" font-size="14.00">
secret
</text>
<text text-anchor="start" x="4633.5" y="-4220.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4632.5" y="-4238.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4681.5" y="-4220.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4681.5" y="-4238.71" font-family="Helvetica,sans-Serif" font-size="14.00">
uuid not null
</text>
<polygon fill="none" stroke="#888888" points="4547.5,-4213.91 4547.5,-4253.91 4757.5,-4253.91 4757.5,-4213.91 4547.5,-4213.91" />
<text text-anchor="start" x="4550.5" y="-4220.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4632.5" y="-4219.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4681.5" y="-4219.71" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<polygon fill="none" stroke="#888888" points="4547.5,-4213.41 4547.5,-4272.41 4757.5,-4272.41 4757.5,-4213.41 4547.5,-4213.41" />
</g> <!-- signedmarkrevocationentry_99c39721 -->
<g id="node33" class="node">
<title>signedmarkrevocationentry_99c39721</title>
<polygon fill="#ebcef2" stroke="transparent" points="4473.5,-4337.91 4473.5,-4356.91 4706.5,-4356.91 4706.5,-4337.91 4473.5,-4337.91" />
<text text-anchor="start" x="4475.5" y="-4344.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4473.5,-4356.91 4473.5,-4375.91 4706.5,-4375.91 4706.5,-4356.91 4473.5,-4356.91" />
<text text-anchor="start" x="4475.5" y="-4363.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.SignedMarkRevocationEntry
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4706.5,-4337.91 4706.5,-4356.91 4832.5,-4356.91 4832.5,-4337.91 4706.5,-4337.91" />
<text text-anchor="start" x="4793.5" y="-4343.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4706.5,-4356.91 4706.5,-4375.91 4832.5,-4375.91 4832.5,-4356.91 4706.5,-4356.91" />
<text text-anchor="start" x="4793.5" y="-4362.71" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="4475.5" y="-4325.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4475.5" y="-4344.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
revision_id
</text>
<text text-anchor="start" x="4638.5" y="-4343.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4708.5" y="-4343.71" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<text text-anchor="start" x="4475.5" y="-4324.71" font-family="Helvetica,sans-Serif" font-size="14.00">
revocation_time
</text>
<text text-anchor="start" x="4638.5" y="-4324.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4708.5" y="-4324.71" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
timestamptz not null
</text>
<text text-anchor="start" x="4475.5" y="-4305.71" font-family="Helvetica,sans-Serif" font-size="14.00">
revocation_time
<text text-anchor="start" x="4475.5" y="-4306.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
smd_id
</text>
<text text-anchor="start" x="4638.5" y="-4305.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4708.5" y="-4305.71" font-family="Helvetica,sans-Serif" font-size="14.00">
timestamptz not null
</text>
<text text-anchor="start" x="4475.5" y="-4287.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
smd_id
</text>
<text text-anchor="start" x="4638.5" y="-4286.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4708.5" y="-4286.71" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<polygon fill="none" stroke="#888888" points="4472,-4279.91 4472,-4357.91 4833,-4357.91 4833,-4279.91 4472,-4279.91" />
<polygon fill="none" stroke="#888888" points="4472,-4298.91 4472,-4376.91 4833,-4376.91 4833,-4298.91 4472,-4298.91" />
</g> <!-- signedmarkrevocationlist_c5d968fb -->
<g id="node34" class="node">
<title>signedmarkrevocationlist_c5d968fb</title>
<polygon fill="#ebcef2" stroke="transparent" points="3827,-4337.91 3827,-4356.91 4049,-4356.91 4049,-4337.91 3827,-4337.91" />
<text text-anchor="start" x="3829" y="-4344.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="3827,-4356.91 3827,-4375.91 4049,-4375.91 4049,-4356.91 3827,-4356.91" />
<text text-anchor="start" x="3829" y="-4363.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.SignedMarkRevocationList
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4049,-4337.91 4049,-4356.91 4159,-4356.91 4159,-4337.91 4049,-4337.91" />
<text text-anchor="start" x="4120" y="-4343.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4049,-4356.91 4049,-4375.91 4159,-4375.91 4159,-4356.91 4049,-4356.91" />
<text text-anchor="start" x="4120" y="-4362.71" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="3829" y="-4325.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="3829" y="-4344.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
revision_id
</text>
<text text-anchor="start" x="3979" y="-4343.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4051" y="-4343.71" font-family="Helvetica,sans-Serif" font-size="14.00">
bigserial not null
</text>
<text text-anchor="start" x="3979" y="-4324.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4051" y="-4324.71" font-family="Helvetica,sans-Serif" font-size="14.00">
bigserial not null
auto-incremented
</text>
<text text-anchor="start" x="3829" y="-4305.71" font-family="Helvetica,sans-Serif" font-size="14.00">
creation_time
</text>
<text text-anchor="start" x="3979" y="-4305.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4051" y="-4305.71" font-family="Helvetica,sans-Serif" font-size="14.00">
auto-incremented
</text>
<text text-anchor="start" x="3829" y="-4286.71" font-family="Helvetica,sans-Serif" font-size="14.00">
creation_time
</text>
<text text-anchor="start" x="3979" y="-4286.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4051" y="-4286.71" font-family="Helvetica,sans-Serif" font-size="14.00">
timestamptz
</text>
<polygon fill="none" stroke="#888888" points="3826,-4279.91 3826,-4357.91 4160,-4357.91 4160,-4279.91 3826,-4279.91" />
<polygon fill="none" stroke="#888888" points="3826,-4298.91 3826,-4376.91 4160,-4376.91 4160,-4298.91 3826,-4298.91" />
</g> <!-- signedmarkrevocationentry_99c39721&#45;&gt;signedmarkrevocationlist_c5d968fb -->
<g id="edge74" class="edge">
<title>signedmarkrevocationentry_99c39721:w-&gt;signedmarkrevocationlist_c5d968fb:e</title>
<path fill="none" stroke="black" d="M4454.39,-4328.91C4333.55,-4328.91 4294.69,-4328.91 4170.3,-4328.91" />
<polygon fill="black" stroke="black" points="4462.5,-4328.91 4472.5,-4333.41 4467.5,-4328.91 4472.5,-4328.91 4472.5,-4328.91 4472.5,-4328.91 4467.5,-4328.91 4472.5,-4324.41 4462.5,-4328.91 4462.5,-4328.91" />
<ellipse fill="none" stroke="black" cx="4458.5" cy="-4328.91" rx="4" ry="4" />
<polygon fill="black" stroke="black" points="4161,-4333.91 4161,-4323.91 4163,-4323.91 4163,-4333.91 4161,-4333.91" />
<polyline fill="none" stroke="black" points="4160,-4328.91 4165,-4328.91 " />
<polygon fill="black" stroke="black" points="4166,-4333.91 4166,-4323.91 4168,-4323.91 4168,-4333.91 4166,-4333.91" />
<polyline fill="none" stroke="black" points="4165,-4328.91 4170,-4328.91 " />
<text text-anchor="start" x="4264" y="-4332.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<path fill="none" stroke="black" d="M4454.39,-4347.91C4333.55,-4347.91 4294.69,-4347.91 4170.3,-4347.91" />
<polygon fill="black" stroke="black" points="4462.5,-4347.91 4472.5,-4352.41 4467.5,-4347.91 4472.5,-4347.91 4472.5,-4347.91 4472.5,-4347.91 4467.5,-4347.91 4472.5,-4343.41 4462.5,-4347.91 4462.5,-4347.91" />
<ellipse fill="none" stroke="black" cx="4458.5" cy="-4347.91" rx="4" ry="4" />
<polygon fill="black" stroke="black" points="4161,-4352.91 4161,-4342.91 4163,-4342.91 4163,-4352.91 4161,-4352.91" />
<polyline fill="none" stroke="black" points="4160,-4347.91 4165,-4347.91 " />
<polygon fill="black" stroke="black" points="4166,-4352.91 4166,-4342.91 4168,-4342.91 4168,-4352.91 4166,-4352.91" />
<polyline fill="none" stroke="black" points="4165,-4347.91 4170,-4347.91 " />
<text text-anchor="start" x="4264" y="-4351.71" font-family="Helvetica,sans-Serif" font-size="14.00">
fk5ivlhvs3121yx2li5tqh54u4
</text>
</g> <!-- spec11threatmatch_a61228a6 -->
<g id="node35" class="node">
<title>spec11threatmatch_a61228a6</title>
<polygon fill="#ebcef2" stroke="transparent" points="4509.5,-4536.91 4509.5,-4555.91 4685.5,-4555.91 4685.5,-4536.91 4509.5,-4536.91" />
<text text-anchor="start" x="4511.5" y="-4543.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4509.5,-4555.91 4509.5,-4574.91 4685.5,-4574.91 4685.5,-4555.91 4509.5,-4555.91" />
<text text-anchor="start" x="4511.5" y="-4562.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.Spec11ThreatMatch
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4685.5,-4536.91 4685.5,-4555.91 4795.5,-4555.91 4795.5,-4536.91 4685.5,-4536.91" />
<text text-anchor="start" x="4756.5" y="-4542.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4685.5,-4555.91 4685.5,-4574.91 4795.5,-4574.91 4795.5,-4555.91 4685.5,-4555.91" />
<text text-anchor="start" x="4756.5" y="-4561.71" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="4511.5" y="-4524.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4511.5" y="-4543.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4646.5" y="-4542.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4687.5" y="-4542.71" font-family="Helvetica,sans-Serif" font-size="14.00">
bigserial not null
</text>
<text text-anchor="start" x="4646.5" y="-4523.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4687.5" y="-4523.71" font-family="Helvetica,sans-Serif" font-size="14.00">
bigserial not null
auto-incremented
</text>
<text text-anchor="start" x="4511.5" y="-4504.71" font-family="Helvetica,sans-Serif" font-size="14.00">
check_date
</text>
<text text-anchor="start" x="4646.5" y="-4504.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4687.5" y="-4504.71" font-family="Helvetica,sans-Serif" font-size="14.00">
auto-incremented
date not null
</text>
<text text-anchor="start" x="4511.5" y="-4485.71" font-family="Helvetica,sans-Serif" font-size="14.00">
check_date
domain_name
</text>
<text text-anchor="start" x="4646.5" y="-4485.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4687.5" y="-4485.71" font-family="Helvetica,sans-Serif" font-size="14.00">
date not null
text not null
</text>
<text text-anchor="start" x="4511.5" y="-4466.71" font-family="Helvetica,sans-Serif" font-size="14.00">
domain_name
domain_repo_id
</text>
<text text-anchor="start" x="4646.5" y="-4466.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
@ -6373,7 +6389,7 @@ td.section {
text not null
</text>
<text text-anchor="start" x="4511.5" y="-4447.71" font-family="Helvetica,sans-Serif" font-size="14.00">
domain_repo_id
registrar_id
</text>
<text text-anchor="start" x="4646.5" y="-4447.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
@ -6381,127 +6397,127 @@ td.section {
text not null
</text>
<text text-anchor="start" x="4511.5" y="-4428.71" font-family="Helvetica,sans-Serif" font-size="14.00">
registrar_id
threat_types
</text>
<text text-anchor="start" x="4646.5" y="-4428.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4687.5" y="-4428.71" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
_text not null
</text>
<text text-anchor="start" x="4511.5" y="-4409.71" font-family="Helvetica,sans-Serif" font-size="14.00">
threat_types
tld
</text>
<text text-anchor="start" x="4646.5" y="-4409.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4687.5" y="-4409.71" font-family="Helvetica,sans-Serif" font-size="14.00">
_text not null
</text>
<text text-anchor="start" x="4511.5" y="-4390.71" font-family="Helvetica,sans-Serif" font-size="14.00">
tld
</text>
<text text-anchor="start" x="4646.5" y="-4390.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4687.5" y="-4390.71" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<polygon fill="none" stroke="#888888" points="4508.5,-4384.41 4508.5,-4557.41 4796.5,-4557.41 4796.5,-4384.41 4508.5,-4384.41" />
<polygon fill="none" stroke="#888888" points="4508.5,-4403.41 4508.5,-4576.41 4796.5,-4576.41 4796.5,-4403.41 4508.5,-4403.41" />
</g> <!-- sqlreplaycheckpoint_342081b3 -->
<g id="node36" class="node">
<title>sqlreplaycheckpoint_342081b3</title>
<polygon fill="#ebcef2" stroke="transparent" points="4496.5,-4621.91 4496.5,-4640.91 4683.5,-4640.91 4683.5,-4621.91 4496.5,-4621.91" />
<text text-anchor="start" x="4498.5" y="-4628.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4496.5,-4640.91 4496.5,-4659.91 4683.5,-4659.91 4683.5,-4640.91 4496.5,-4640.91" />
<text text-anchor="start" x="4498.5" y="-4647.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.SqlReplayCheckpoint
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4683.5,-4621.91 4683.5,-4640.91 4809.5,-4640.91 4809.5,-4621.91 4683.5,-4621.91" />
<text text-anchor="start" x="4770.5" y="-4627.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4683.5,-4640.91 4683.5,-4659.91 4809.5,-4659.91 4809.5,-4640.91 4683.5,-4640.91" />
<text text-anchor="start" x="4770.5" y="-4646.71" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="4498.5" y="-4609.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4498.5" y="-4628.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
revision_id
</text>
<text text-anchor="start" x="4639.5" y="-4627.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4685.5" y="-4627.71" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<text text-anchor="start" x="4498.5" y="-4608.71" font-family="Helvetica,sans-Serif" font-size="14.00">
last_replay_time
</text>
<text text-anchor="start" x="4639.5" y="-4608.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4685.5" y="-4608.71" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<text text-anchor="start" x="4498.5" y="-4589.71" font-family="Helvetica,sans-Serif" font-size="14.00">
last_replay_time
</text>
<text text-anchor="start" x="4639.5" y="-4589.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4685.5" y="-4589.71" font-family="Helvetica,sans-Serif" font-size="14.00">
timestamptz not null
</text>
<polygon fill="none" stroke="#888888" points="4495,-4583.41 4495,-4642.41 4810,-4642.41 4810,-4583.41 4495,-4583.41" />
<polygon fill="none" stroke="#888888" points="4495,-4602.41 4495,-4661.41 4810,-4661.41 4810,-4602.41 4495,-4602.41" />
</g> <!-- tmchcrl_d282355 -->
<g id="node38" class="node">
<title>tmchcrl_d282355</title>
<polygon fill="#ebcef2" stroke="transparent" points="4509.5,-4726.91 4509.5,-4745.91 4669.5,-4745.91 4669.5,-4726.91 4509.5,-4726.91" />
<text text-anchor="start" x="4511.5" y="-4733.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4516.5,-4763.91 4516.5,-4782.91 4663.5,-4782.91 4663.5,-4763.91 4516.5,-4763.91" />
<text text-anchor="start" x="4518.5" y="-4770.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.TmchCrl
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4669.5,-4726.91 4669.5,-4745.91 4795.5,-4745.91 4795.5,-4726.91 4669.5,-4726.91" />
<text text-anchor="start" x="4756.5" y="-4732.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4663.5,-4763.91 4663.5,-4782.91 4789.5,-4782.91 4789.5,-4763.91 4663.5,-4763.91" />
<text text-anchor="start" x="4750.5" y="-4769.71" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="4511.5" y="-4714.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4518.5" y="-4750.71" font-family="Helvetica,sans-Serif" font-size="14.00">
certificate_revocations
</text>
<text text-anchor="start" x="4663.5" y="-4713.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4657.5" y="-4750.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4671.5" y="-4713.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4665.5" y="-4750.71" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<text text-anchor="start" x="4511.5" y="-4695.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4518.5" y="-4731.71" font-family="Helvetica,sans-Serif" font-size="14.00">
update_timestamp
</text>
<text text-anchor="start" x="4663.5" y="-4694.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4657.5" y="-4731.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4671.5" y="-4694.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4665.5" y="-4731.71" font-family="Helvetica,sans-Serif" font-size="14.00">
timestamptz not null
</text>
<text text-anchor="start" x="4511.5" y="-4676.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4518.5" y="-4712.71" font-family="Helvetica,sans-Serif" font-size="14.00">
url
</text>
<text text-anchor="start" x="4663.5" y="-4675.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4657.5" y="-4712.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4671.5" y="-4675.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4665.5" y="-4712.71" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<polygon fill="none" stroke="#888888" points="4508.5,-4668.91 4508.5,-4746.91 4796.5,-4746.91 4796.5,-4668.91 4508.5,-4668.91" />
<text text-anchor="start" x="4518.5" y="-4694.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4657.5" y="-4693.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4665.5" y="-4693.71" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<polygon fill="none" stroke="#888888" points="4515,-4687.41 4515,-4784.41 4790,-4784.41 4790,-4687.41 4515,-4687.41" />
</g> <!-- transaction_d50389d4 -->
<g id="node39" class="node">
<title>transaction_d50389d4</title>
<polygon fill="#ebcef2" stroke="transparent" points="4535.5,-4830.91 4535.5,-4849.91 4660.5,-4849.91 4660.5,-4830.91 4535.5,-4830.91" />
<text text-anchor="start" x="4537.5" y="-4837.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4535.5,-4868.91 4535.5,-4887.91 4660.5,-4887.91 4660.5,-4868.91 4535.5,-4868.91" />
<text text-anchor="start" x="4537.5" y="-4875.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public.Transaction
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4660.5,-4830.91 4660.5,-4849.91 4770.5,-4849.91 4770.5,-4830.91 4660.5,-4830.91" />
<text text-anchor="start" x="4731.5" y="-4836.71" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="#ebcef2" stroke="transparent" points="4660.5,-4868.91 4660.5,-4887.91 4770.5,-4887.91 4770.5,-4868.91 4660.5,-4868.91" />
<text text-anchor="start" x="4731.5" y="-4874.71" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="4537.5" y="-4818.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
<text text-anchor="start" x="4537.5" y="-4856.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4623.5" y="-4855.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4662.5" y="-4855.71" font-family="Helvetica,sans-Serif" font-size="14.00">
bigserial not null
</text>
<text text-anchor="start" x="4623.5" y="-4836.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4662.5" y="-4836.71" font-family="Helvetica,sans-Serif" font-size="14.00">
auto-incremented
</text>
<text text-anchor="start" x="4537.5" y="-4817.71" font-family="Helvetica,sans-Serif" font-size="14.00">
contents
</text>
<text text-anchor="start" x="4623.5" y="-4817.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4662.5" y="-4817.71" font-family="Helvetica,sans-Serif" font-size="14.00">
bigserial not null
</text>
<text text-anchor="start" x="4623.5" y="-4798.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4662.5" y="-4798.71" font-family="Helvetica,sans-Serif" font-size="14.00">
auto-incremented
</text>
<text text-anchor="start" x="4537.5" y="-4779.71" font-family="Helvetica,sans-Serif" font-size="14.00">
contents
</text>
<text text-anchor="start" x="4623.5" y="-4779.71" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4662.5" y="-4779.71" font-family="Helvetica,sans-Serif" font-size="14.00">
bytea
</text>
<polygon fill="none" stroke="#888888" points="4534,-4772.91 4534,-4850.91 4771,-4850.91 4771,-4772.91 4534,-4772.91" />
<polygon fill="none" stroke="#888888" points="4534,-4810.91 4534,-4888.91 4771,-4888.91 4771,-4810.91 4534,-4810.91" />
</g>
</g>
</svg>
@ -13062,9 +13078,14 @@ td.section {
<tbody>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>secret</i></b></td>
<td class="minwidth">secret</td>
<td class="minwidth">uuid not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>id</i></b></td>
<td class="minwidth">int8 not null</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
@ -13080,7 +13101,7 @@ td.section {
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">secret</td>
<td class="minwidth">id</td>
<td class="minwidth"></td>
</tr>
<tr>
@ -13098,7 +13119,7 @@ td.section {
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">secret</td>
<td class="minwidth">id</td>
<td class="minwidth">ascending</td>
</tr>
</tbody>
@ -13707,19 +13728,24 @@ td.section {
<tbody>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>certificate_revocations</i></b></td>
<td class="minwidth">certificate_revocations</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>update_timestamp</i></b></td>
<td class="minwidth">update_timestamp</td>
<td class="minwidth">timestamptz not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>url</i></b></td>
<td class="minwidth">url</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>id</i></b></td>
<td class="minwidth">int8 not null</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
@ -13735,17 +13761,7 @@ td.section {
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">certificate_revocations</td>
<td class="minwidth"></td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">update_timestamp</td>
<td class="minwidth"></td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">url</td>
<td class="minwidth">id</td>
<td class="minwidth"></td>
</tr>
<tr>
@ -13763,17 +13779,7 @@ td.section {
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">certificate_revocations</td>
<td class="minwidth">ascending</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">update_timestamp</td>
<td class="minwidth">ascending</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">url</td>
<td class="minwidth">id</td>
<td class="minwidth">ascending</td>
</tr>
</tbody>

View file

@ -89,3 +89,4 @@ V88__transfer_billing_cancellation_history_id.sql
V89__host_history_host_deferred.sql
V90__update_timestamp.sql
V91__defer_fkeys.sql
V92__singletons.sql

View file

@ -0,0 +1,21 @@
-- Copyright 2021 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 "ServerSecret" DROP CONSTRAINT "ServerSecret_pkey";
ALTER TABLE "ServerSecret" ADD COLUMN id bigint NOT NULL;
ALTER TABLE "ServerSecret" ADD PRIMARY KEY(id);
ALTER TABLE "TmchCrl" DROP CONSTRAINT "TmchCrl_pkey";
ALTER TABLE "TmchCrl" ADD COLUMN id bigint NOT NULL;
ALTER TABLE "TmchCrl" ADD PRIMARY KEY(id);

View file

@ -665,8 +665,9 @@
);
create table "ServerSecret" (
secret uuid not null,
primary key (secret)
id int8 not null,
secret uuid,
primary key (id)
);
create table "SignedMarkRevocationEntry" (
@ -742,10 +743,11 @@
);
create table "TmchCrl" (
certificate_revocations text not null,
id int8 not null,
certificate_revocations text not null,
update_timestamp timestamptz not null,
url text not null,
primary key (certificate_revocations, update_timestamp, url)
primary key (id)
);
create table "Transaction" (

View file

@ -948,7 +948,8 @@ ALTER SEQUENCE public."SafeBrowsingThreat_id_seq" OWNED BY public."Spec11ThreatM
--
CREATE TABLE public."ServerSecret" (
secret uuid NOT NULL
secret uuid NOT NULL,
id bigint NOT NULL
);
@ -1055,7 +1056,8 @@ CREATE TABLE public."Tld" (
CREATE TABLE public."TmchCrl" (
certificate_revocations text NOT NULL,
update_timestamp timestamp with time zone NOT NULL,
url text NOT NULL
url text NOT NULL,
id bigint NOT NULL
);
@ -1389,7 +1391,7 @@ ALTER TABLE ONLY public."Spec11ThreatMatch"
--
ALTER TABLE ONLY public."ServerSecret"
ADD CONSTRAINT "ServerSecret_pkey" PRIMARY KEY (secret);
ADD CONSTRAINT "ServerSecret_pkey" PRIMARY KEY (id);
--
@ -1429,7 +1431,7 @@ ALTER TABLE ONLY public."Tld"
--
ALTER TABLE ONLY public."TmchCrl"
ADD CONSTRAINT "TmchCrl_pkey" PRIMARY KEY (certificate_revocations, update_timestamp, url);
ADD CONSTRAINT "TmchCrl_pkey" PRIMARY KEY (id);
--