mirror of
https://github.com/google/nomulus
synced 2026-07-24 00:52:42 +00:00
Add indexes on domainRepoId to DomainHistoryHost and PollMessage (#2380)
* Add index for domainRepoId to PollMessage and DomainHistoryHost * Add flyway fix for Concurrent * fix gradle.properties * Modify lockfiles * Update the release tool and add IF NOT EXISTS * Test removing transactional lock from deploy script * Add transactional lock flag to actual flyway commands in script * Remove flag from info command * Add configuration for integration test
This commit is contained in:
@@ -91,11 +91,13 @@ public class DomainHistory extends HistoryEntry {
|
||||
@ElementCollection
|
||||
@JoinTable(
|
||||
name = "DomainHistoryHost",
|
||||
indexes =
|
||||
@Index(
|
||||
columnList =
|
||||
"domain_history_history_revision_id,domain_history_domain_repo_id,host_repo_id",
|
||||
unique = true))
|
||||
indexes = {
|
||||
@Index(columnList = "domain_history_domain_repo_id"),
|
||||
@Index(
|
||||
columnList =
|
||||
"domain_history_history_revision_id,domain_history_domain_repo_id,host_repo_id",
|
||||
unique = true)
|
||||
})
|
||||
@Column(name = "host_repo_id")
|
||||
Set<VKey<Host>> nsHosts;
|
||||
|
||||
|
||||
@@ -86,7 +86,12 @@ import org.joda.time.DateTime;
|
||||
@ExternalMessagingName("message")
|
||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||
@DiscriminatorColumn(name = "type")
|
||||
@Table(indexes = {@Index(columnList = "registrar_id"), @Index(columnList = "eventTime")})
|
||||
@Table(
|
||||
indexes = {
|
||||
@Index(columnList = "domainRepoId"),
|
||||
@Index(columnList = "registrar_id"),
|
||||
@Index(columnList = "eventTime")
|
||||
})
|
||||
public abstract class PollMessage extends ImmutableObject
|
||||
implements Buildable, TransferServerApproveEntity, UnsafeSerializable {
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.beust.jcommander.Parameters;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.flywaydb.database.postgresql.PostgreSQLConfigurationExtension;
|
||||
import org.testcontainers.containers.Container;
|
||||
|
||||
/**
|
||||
@@ -50,6 +51,10 @@ public class DumpGoldenSchemaCommand extends PostgresqlCommand {
|
||||
postgresContainer.getUsername(),
|
||||
postgresContainer.getPassword())
|
||||
.load();
|
||||
|
||||
PostgreSQLConfigurationExtension configurationExtension =
|
||||
flyway.getConfigurationExtension(PostgreSQLConfigurationExtension.class);
|
||||
configurationExtension.setTransactionalLock(false);
|
||||
flyway.migrate();
|
||||
|
||||
String userName = postgresContainer.getUsername();
|
||||
|
||||
Reference in New Issue
Block a user