mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 11:16:04 +02:00
Add flyway fix for Concurrent
This commit is contained in:
parent
5593a44802
commit
5d83b4b9f3
19 changed files with 83 additions and 10 deletions
|
@ -17,6 +17,7 @@ import java.util.Optional
|
|||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id "org.flywaydb.flyway" version "10.8.1"
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
|
@ -317,6 +318,7 @@ dependencies {
|
|||
|
||||
// Flyway classes needed to generate the golden file.
|
||||
implementation deps['org.flywaydb:flyway-core']
|
||||
implementation deps['org.flywaydb:flyway-database-postgresql']
|
||||
|
||||
closureCompiler deps['com.google.javascript:closure-compiler']
|
||||
}
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
# This is a Gradle generated file for dependency locking.
|
||||
# Manual edits can break the build and are not advised.
|
||||
# This file is expected to be part of source control.
|
||||
empty=classpath
|
||||
com.fasterxml.jackson.core:jackson-annotations:2.15.2=classpath
|
||||
com.fasterxml.jackson.core:jackson-core:2.15.2=classpath
|
||||
com.fasterxml.jackson.core:jackson-databind:2.15.2=classpath
|
||||
com.fasterxml.jackson.dataformat:jackson-dataformat-toml:2.15.2=classpath
|
||||
com.fasterxml.jackson:jackson-bom:2.15.2=classpath
|
||||
com.google.code.gson:gson:2.10.1=classpath
|
||||
gradle.plugin.org.flywaydb:gradle-plugin-publishing:10.8.1=classpath
|
||||
org.flywaydb.flyway:org.flywaydb.flyway.gradle.plugin:10.8.1=classpath
|
||||
org.flywaydb:flyway-core:10.8.1=classpath
|
||||
empty=
|
||||
|
|
|
@ -407,7 +407,7 @@ org.eclipse.jetty:jetty-session:12.0.7=testCompileClasspath,testRuntimeClasspath
|
|||
org.eclipse.jetty:jetty-util:12.0.7=testCompileClasspath,testRuntimeClasspath
|
||||
org.eclipse.jetty:jetty-xml:12.0.7=testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.gwtproject:gwt-user:2.10.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -147,6 +147,9 @@ publishing {
|
|||
|
||||
flyway {
|
||||
def accessInfo = project.ext.getJdbcAccessInfo()
|
||||
pluginConfiguration = [
|
||||
postgresqlTransactionalLock: 'false'
|
||||
]
|
||||
|
||||
url = accessInfo.url
|
||||
user = accessInfo.user
|
||||
|
@ -160,7 +163,7 @@ dependencies {
|
|||
def deps = rootProject.dependencyMap
|
||||
|
||||
implementation deps['org.flywaydb:flyway-core']
|
||||
runtimeOnly deps['org.flywaydb:flyway-database-postgresql']
|
||||
implementation deps['org.flywaydb:flyway-database-postgresql']
|
||||
|
||||
runtimeOnly deps['com.google.cloud.sql:postgres-socket-factory']
|
||||
runtimeOnly deps['org.postgresql:postgresql']
|
||||
|
|
|
@ -91,7 +91,7 @@ org.checkerframework:checker-qual:3.12.0=checkstyle
|
|||
org.checkerframework:checker-qual:3.33.0=annotationProcessor,errorprone,testAnnotationProcessor
|
||||
org.checkerframework:checker-qual:3.42.0=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.hamcrest:hamcrest-core:1.3=testCompileClasspath,testRuntimeClasspath
|
||||
org.jacoco:org.jacoco.agent:0.8.11=jacocoAgent,jacocoAnt
|
||||
org.jacoco:org.jacoco.ant:0.8.11=jacocoAnt
|
||||
|
|
|
@ -261,11 +261,11 @@ td.section {
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="property_name">generated on</td>
|
||||
<td class="property_value">2024-03-11 20:42:54.463293864</td>
|
||||
<td class="property_value">2024-03-14 23:12:37.761866826</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="property_name">last flyway file</td>
|
||||
<td id="lastFlywayFile" class="property_value">V164__rename_console_user_history_time.sql</td>
|
||||
<td id="lastFlywayFile" class="property_value">V165__add_domain_repo_id_indexes_to_more_tables.sql</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -280,7 +280,7 @@ td.section {
|
|||
<text text-anchor="start" x="3730.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text>
|
||||
<text text-anchor="start" x="3813.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.10.1</text>
|
||||
<text text-anchor="start" x="3729.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text>
|
||||
<text text-anchor="start" x="3813.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-11 20:42:54.463293864</text>
|
||||
<text text-anchor="start" x="3813.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-14 23:12:37.761866826</text>
|
||||
<polygon fill="none" stroke="#888888" points="3726,-4 3726,-44 4013,-44 4013,-4 3726,-4" /> <!-- allocationtoken_a08ccbef -->
|
||||
<g id="node1" class="node">
|
||||
<title>
|
||||
|
|
|
@ -261,11 +261,11 @@ td.section {
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="property_name">generated on</td>
|
||||
<td class="property_value">2024-03-11 20:42:51.738018408</td>
|
||||
<td class="property_value">2024-03-14 23:12:35.464952842</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="property_name">last flyway file</td>
|
||||
<td id="lastFlywayFile" class="property_value">V164__rename_console_user_history_time.sql</td>
|
||||
<td id="lastFlywayFile" class="property_value">V165__add_domain_repo_id_indexes_to_more_tables.sql</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -280,7 +280,7 @@ td.section {
|
|||
<text text-anchor="start" x="4443.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text>
|
||||
<text text-anchor="start" x="4526.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.10.1</text>
|
||||
<text text-anchor="start" x="4442.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text>
|
||||
<text text-anchor="start" x="4526.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-11 20:42:51.738018408</text>
|
||||
<text text-anchor="start" x="4526.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-03-14 23:12:35.464952842</text>
|
||||
<polygon fill="none" stroke="#888888" points="4439,-4 4439,-44 4726,-44 4726,-4 4439,-4" /> <!-- allocationtoken_a08ccbef -->
|
||||
<g id="node1" class="node">
|
||||
<title>
|
||||
|
@ -8671,6 +8671,18 @@ td.section {
|
|||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="name">idx69qun5kxt3eux5igrxrqcycv0</td>
|
||||
<td class="description right">[non-unique index]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"></td>
|
||||
<td class="minwidth">domain_history_domain_repo_id</td>
|
||||
<td class="minwidth">ascending</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="name">ukt2e7ae3t8gcsxd13wjx2ka7ij</td>
|
||||
<td class="description right">[unique index]</td>
|
||||
|
@ -10253,6 +10265,18 @@ td.section {
|
|||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="name">idxf2q9dqj899h1q8lah5y719nxd</td>
|
||||
<td class="description right">[non-unique index]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spacer"></td>
|
||||
<td class="minwidth">domain_repo_id</td>
|
||||
<td class="minwidth">ascending</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="name">idxe7wu46c7wpvfmfnj4565abibp</td>
|
||||
<td class="description right">[non-unique index]</td>
|
||||
|
|
|
@ -162,3 +162,4 @@ V161__rename_console_epp_history_time.sql
|
|||
V162__rename_console_poc_history_time.sql
|
||||
V163__rename_console_registrar_history_time.sql
|
||||
V164__rename_console_user_history_time.sql
|
||||
V165__add_domain_repo_id_indexes_to_more_tables.sql
|
||||
|
|
|
@ -1961,6 +1961,13 @@ CREATE INDEX idx5yqacw829y5bm6f7eajsq1cts ON public."UserUpdateHistory" USING bt
|
|||
CREATE INDEX idx67qwkjtlq5q8dv6egtrtnhqi7 ON public."HostHistory" USING btree (history_modification_time);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx69qun5kxt3eux5igrxrqcycv0; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx69qun5kxt3eux5igrxrqcycv0 ON public."DomainHistoryHost" USING btree (domain_history_domain_repo_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx6ebt3nwk5ocvnremnhnlkl6ff; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -2129,6 +2136,13 @@ CREATE INDEX idxe7wu46c7wpvfmfnj4565abibp ON public."PollMessage" USING btree (r
|
|||
CREATE INDEX idxeokttmxtpq2hohcioe5t2242b ON public."BillingCancellation" USING btree (registrar_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idxf2q9dqj899h1q8lah5y719nxd; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxf2q9dqj899h1q8lah5y719nxd ON public."PollMessage" USING btree (domain_repo_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idxfdk2xpil2x1gh0omt84k2y3o1; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.net.URL;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Paths;
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.flywaydb.database.postgresql.PostgreSQLConfigurationExtension;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
|
||||
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
|
||||
|
@ -92,6 +93,10 @@ class SchemaTest {
|
|||
sqlContainer.getJdbcUrl(), sqlContainer.getUsername(), sqlContainer.getPassword())
|
||||
.load();
|
||||
|
||||
PostgreSQLConfigurationExtension configurationExtension =
|
||||
flyway.getConfigurationExtension(PostgreSQLConfigurationExtension.class);
|
||||
configurationExtension.setTransactionalLock(false);
|
||||
|
||||
// flyway.migrate() returns the number of newly pushed scripts. This is a variable
|
||||
// number as our schema evolves.
|
||||
assertThat(flyway.migrate().migrations).isNotEmpty();
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<<<<<<< HEAD
|
||||
# This file defines properties used by the gradle build. It must be kept in
|
||||
=======
|
||||
# This file defines properties used by the gradle build. It must be kept in
|
||||
>>>>>>> c410b233f (Add flyway fix for Concurrent)
|
||||
# sync with config/nom_build.py.
|
||||
#
|
||||
# To regenerate, run ./nom_build --generate-gradle-properties
|
||||
|
|
|
@ -324,6 +324,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=deploy_jar,runtimeClasspath,testR
|
|||
org.codehaus.mojo:animal-sniffer-annotations:1.23=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
org.conscrypt:conscrypt-openjdk-uber:2.5.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:jaxb-runtime:2.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:txw2:2.3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
org.gwtproject:gwt-user:2.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
|
|
|
@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
|
|||
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
|
||||
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
|
|
|
@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
|
|||
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
|
||||
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
|
|
|
@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
|
|||
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
|
||||
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
|
|
|
@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
|
|||
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
|
||||
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
|
|
|
@ -304,6 +304,7 @@ org.codehaus.jackson:jackson-mapper-asl:1.9.13=compileClasspath,runtimeClasspath
|
|||
org.codehaus.mojo:animal-sniffer-annotations:1.23=runtimeClasspath,testRuntimeClasspath
|
||||
org.conscrypt:conscrypt-openjdk-uber:2.5.2=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-core:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.flywaydb:flyway-database-postgresql:10.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:jaxb-runtime:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.glassfish.jaxb:txw2:2.3.1=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.gwtproject:gwt-user:2.10.0=compileClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue