diff --git a/.github/workflows/release-published.yml b/.github/workflows/release-published.yml index eb9d2ffb..172bb08d 100644 --- a/.github/workflows/release-published.yml +++ b/.github/workflows/release-published.yml @@ -26,4 +26,27 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + + deploy_xsd: + name: Upload xsds + runs-on: ubuntu-20.04 + outputs: + tag: ${{ steps.collect-data.outputs.tag }} + version: ${{ needs.setup.outputs.version }} + steps: + - name: Download liquibase mongodb xsd + uses: actions/checkout@v3 + with: + # Relative path under $GITHUB_WORKSPACE to place the repository + path: liquibase-mongodb + repository: "liquibase/liquibase-mongodb" + + - name: Upload to s3 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.LIQUIBASEORIGIN_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.LIQUIBASEORIGIN_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: us-east-1 + # aws s3 sync syncs directories and S3 prefixes. + run: | + aws s3 sync liquibase-mongodb/src/main/resources/www.liquibase.org/xml/ns/mongodb/ s3://liquibaseorg-origin/xml/ns/mongodb/ --content-type application/octet-stream --only-show-errors diff --git a/README.md b/README.md index 43e4534e..29fac2be 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ Liquibase turned to be the most feasible tool to extend as it allows to define c ## Release Notes +#### 4.21.0 +* Support for Liquibase 4.20.0 + #### 4.4.0 * Updated code to work with core 4.4.0 [PR #147](https://github.com/liquibase/liquibase-mongodb/pull/147) * Bump mockito-core from 3.10.0 to 3.11.0 [PR#151](https://github.com/liquibase/liquibase-mongodb/pull/151) diff --git a/README.test-harness.md b/README.test-harness.md new file mode 100644 index 00000000..d85e348c --- /dev/null +++ b/README.test-harness.md @@ -0,0 +1,27 @@ +# Using the Liquibase Test Harness in the MongoDB Extension +The liquibase-mongodb extension now comes with integration test support via the liquibase-test-harness. +This Liquibase test framework is designed to *also* make it easier for you to test your extensions. + +### Configuring your project + +#### Configuring your connections + +- Use the provided `harness-config.yml` file in `src/test/resources` directory. +- Update this file to add the connection information for all the databases you want the Liquibase MongoDB extension to be tested against. + - *If this config file does not exist, create a new one using this as an example : https://github.com/liquibase/liquibase-test-harness/blob/main/src/test/resources/harness-config.yml* +- Your database under test needs to be completely empty prior to the Harness tests running. + +#### Executing the Harness NoSQL Foundational test +- From your IDE, right-click on the `HarnessNoSqlCompatibility` test class present in `src/test/groovy/liquibase/harness/compatibility/foundational` directory. + - Doing so, will allow you to execute NoSQL Foundational harness suite. Test data for this test should be located in the next directories: + - `src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql` for the changelogs you want to test. XML, JSON & YAML formats are supported. + - `src/test/resources/liquibase/harness/compatibility/foundational/expectedResultSet/mongodb` for the JSON format files with the values you expect to be present in the DATABASECHANGELOG table after applying your changelog files. + In the key:value format like: `"id":"1"`, `"author":"as"`,`"description":"createCollection collectionName=towns"`, etc. Use existing files as an example. + +##### Alternative ways to run the Harness test suites +- Using maven by executing next command: + `mvn -Dtest="HarnessNoSqlCompatibility" -DdbName=mongodb(optional) -DdbUsername=USERNAME(optional) -DdbPassword=PASSWORD(optional) -DdbUrl=URL(optional) test` + - where USERNAME, PASSWORD and URL are connection credentials. + +#### Troubleshooting notes +- If your IDE doesn't allow you to run HarnessNoSqlCompatibility as a test class, mark test/groovy folder as test classes folder in your IDE diff --git a/pom.xml b/pom.xml index d5bdc00a..fd52f25f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.liquibase.ext liquibase-mongodb jar - 4.19.1-SNAPSHOT + 4.21.1-SNAPSHOT Liquibase MongoDB Extension Liquibase Extension for MongoDB http://www.liquibase.org @@ -42,7 +42,7 @@ 1.3.2 4.11.0 4.8.0 - 4.8.2 + 4.9.1 1.18.26 1.3 3.24.2 @@ -54,7 +54,7 @@ 2.0.0 3.2.0 2.14.2 - 1.33 + 2.0 1.6.8 3.2.0 2.5.3 @@ -65,13 +65,19 @@ org.liquibase liquibase-core - 4.19.0 + 4.20.0 org.codehaus.groovy groovy-all - 3.0.14 + 3.0.17 pom + + + org.codehaus.groovy + groovy-testng + + org.spockframework @@ -94,7 +100,7 @@ org.json json - 20220924 + 20230227 org.skyscreamer @@ -192,13 +198,13 @@ org.slf4j slf4j-api - 2.0.6 + 2.0.7 test org.slf4j slf4j-simple - 2.0.6 + 2.0.7 test @@ -241,7 +247,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.0.0 true @@ -278,7 +284,7 @@ org.apache.maven.surefire surefire-junit-platform - 2.22.2 + 3.0.0 diff --git a/src/main/java/liquibase/ext/mongodb/database/MongoConnection.java b/src/main/java/liquibase/ext/mongodb/database/MongoConnection.java index a04bb9d6..bf9ece29 100644 --- a/src/main/java/liquibase/ext/mongodb/database/MongoConnection.java +++ b/src/main/java/liquibase/ext/mongodb/database/MongoConnection.java @@ -32,6 +32,8 @@ import lombok.NoArgsConstructor; import lombok.Setter; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; import java.sql.Driver; import java.util.Collections; import java.util.Objects; @@ -121,8 +123,8 @@ private String injectCredentials(final String url, final Properties driverProper if (nonNull(driverProperties)) { - final Optional user = Optional.ofNullable(StringUtil.trimToNull(driverProperties.getProperty("user"))); - final Optional password = Optional.ofNullable(StringUtil.trimToNull(driverProperties.getProperty("password"))); + final Optional user = Optional.ofNullable(StringUtil.trimToNull(driverProperties.getProperty("user"))).map(MongoConnection::encode); + final Optional password = Optional.ofNullable(StringUtil.trimToNull(driverProperties.getProperty("password"))).map(MongoConnection::encode); if (user.isPresent()) { // injects credentials @@ -136,6 +138,13 @@ private String injectCredentials(final String url, final Properties driverProper return url; } + private static String encode(String s) { + try { + return URLEncoder.encode(s, "UTF-8"); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + } @Override public void close() throws DatabaseException { diff --git a/src/main/java/liquibase/ext/mongodb/lockservice/MongoLockService.java b/src/main/java/liquibase/ext/mongodb/lockservice/MongoLockService.java index f61b399c..3eda0aee 100644 --- a/src/main/java/liquibase/ext/mongodb/lockservice/MongoLockService.java +++ b/src/main/java/liquibase/ext/mongodb/lockservice/MongoLockService.java @@ -82,7 +82,16 @@ protected List queryLocks() throws DatabaseException { @Override protected Boolean existsRepository() throws DatabaseException { - return getExecutor().queryForLong(new CountCollectionByNameStatement(getDatabase().getDatabaseChangeLogLockTableName())) == 1L; + try { + return getExecutor().queryForLong(new CountCollectionByNameStatement(getDatabase().getDatabaseChangeLogLockTableName())) == 1L; + } catch (DatabaseException e){ + if("Could not query for long".equalsIgnoreCase(e.getMessage())){ + //"Could not query for long" is not meaningful let's remove it from trace and rethrow underlying exception + throw new DatabaseException("Failed to create or initialize the lock table",e.getCause()); + } else { + throw e; + } + } } @Override diff --git a/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java b/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java index e0bdda47..726ca532 100644 --- a/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java +++ b/src/main/java/liquibase/nosql/changelog/AbstractNoSqlHistoryService.java @@ -27,7 +27,9 @@ import liquibase.exception.DatabaseException; import liquibase.exception.DatabaseHistoryException; import liquibase.exception.UnexpectedLiquibaseException; +import liquibase.executor.Executor; import liquibase.executor.ExecutorService; +import liquibase.executor.LoggingExecutor; import liquibase.logging.Logger; import liquibase.nosql.database.AbstractNoSqlDatabase; import liquibase.nosql.executor.NoSqlExecutor; @@ -37,6 +39,7 @@ import java.time.Clock; import java.util.Date; import java.util.List; +import java.util.ResourceBundle; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; @@ -51,6 +54,8 @@ public abstract class AbstractNoSqlHistoryService sqlVisitors) } else if (sql instanceof UpdateStatement) { execute((UpdateStatement) sql); } else { - throw new IllegalArgumentException("Mongodb cannot execute "+sql.getClass().getName()+" statements"); + throw new DatabaseException("liquibase-mongodb extension cannot execute changeset \n" + + "Unknown type: " + sql.getClass().getName() + + "\nPlease check the following common causes:\n" + + "- Verify change set definitions for common error such as: changeType name, changeSet attributes spelling " + + "(such as runWith, context, etc.), and punctuation.\n" + + "- Verify that changesets have all the required changeset attributes and do not have invalid attributes for the designated change type.\n" + + "- Double-check to make sure your basic setup includes all needed extensions in your Java classpath"); } } diff --git a/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java b/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java index 18f20231..2a1ee362 100644 --- a/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java +++ b/src/main/java/liquibase/nosql/lockservice/AbstractNoSqlLockService.java @@ -27,7 +27,9 @@ import liquibase.exception.DatabaseException; import liquibase.exception.LockException; import liquibase.exception.UnexpectedLiquibaseException; +import liquibase.executor.Executor; import liquibase.executor.ExecutorService; +import liquibase.executor.LoggingExecutor; import liquibase.lockservice.DatabaseChangeLogLock; import liquibase.lockservice.LockService; import liquibase.logging.Logger; @@ -39,6 +41,7 @@ import java.text.DateFormat; import java.time.Clock; import java.util.List; +import java.util.ResourceBundle; import static java.lang.Boolean.FALSE; import static java.lang.Boolean.TRUE; @@ -51,6 +54,8 @@ public abstract class AbstractNoSqlLockService private boolean hasChangeLogLock; + private static final ResourceBundle mongoBundle = ResourceBundle.getBundle("liquibase/i18n/liquibase-mongo"); + private Long changeLogLockPollRate; private Long changeLogLockRecheckTime; @@ -83,8 +88,12 @@ public D getDatabase() { return database; } - public NoSqlExecutor getExecutor() { - return (NoSqlExecutor) Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor(NoSqlExecutor.EXECUTOR_NAME, getDatabase()); + public NoSqlExecutor getExecutor() throws DatabaseException { + Executor executor = Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor(NoSqlExecutor.EXECUTOR_NAME, getDatabase()); + if (executor instanceof LoggingExecutor) { + throw new DatabaseException(String.format(mongoBundle.getString("command.unsupported"), "*sql")); + } + return (NoSqlExecutor) executor ; } @Override diff --git a/src/main/java/liquibase/nosql/snapshot/NoSqlSnapshotGenerator.java b/src/main/java/liquibase/nosql/snapshot/NoSqlSnapshotGenerator.java new file mode 100644 index 00000000..2aacd0c6 --- /dev/null +++ b/src/main/java/liquibase/nosql/snapshot/NoSqlSnapshotGenerator.java @@ -0,0 +1,41 @@ +package liquibase.nosql.snapshot; + +import liquibase.database.Database; +import liquibase.exception.DatabaseException; +import liquibase.ext.mongodb.database.MongoLiquibaseDatabase; +import liquibase.snapshot.DatabaseSnapshot; +import liquibase.snapshot.InvalidExampleException; +import liquibase.snapshot.SnapshotGenerator; +import liquibase.snapshot.SnapshotGeneratorChain; +import liquibase.structure.DatabaseObject; + +import java.util.ResourceBundle; + +import static liquibase.plugin.Plugin.PRIORITY_SPECIALIZED; + +public class NoSqlSnapshotGenerator implements SnapshotGenerator { + private static final ResourceBundle mongoBundle = ResourceBundle.getBundle("liquibase/i18n/liquibase-mongo"); + + @Override + public int getPriority(Class objectType, Database database) { + if (database instanceof MongoLiquibaseDatabase) { + return PRIORITY_SPECIALIZED; + } + return PRIORITY_NONE; + } + + @Override + public T snapshot(T example, DatabaseSnapshot snapshot, SnapshotGeneratorChain chain) throws DatabaseException, InvalidExampleException { + throw new DatabaseException(String.format(mongoBundle.getString("command.unsupported"), "db-doc, diff*, generate-changelog, and snapshot*")); + } + + @Override + public Class[] addsTo() { + return new Class[0]; + } + + @Override + public Class[] replaces() { + return new Class[0]; + } +} diff --git a/src/main/resources/META-INF/services/liquibase.snapshot.SnapshotGenerator b/src/main/resources/META-INF/services/liquibase.snapshot.SnapshotGenerator new file mode 100644 index 00000000..c6ce01d5 --- /dev/null +++ b/src/main/resources/META-INF/services/liquibase.snapshot.SnapshotGenerator @@ -0,0 +1 @@ +liquibase.nosql.snapshot.NoSqlSnapshotGenerator diff --git a/src/main/resources/liquibase/i18n/liquibase-mongo.properties b/src/main/resources/liquibase/i18n/liquibase-mongo.properties new file mode 100644 index 00000000..dc359892 --- /dev/null +++ b/src/main/resources/liquibase/i18n/liquibase-mongo.properties @@ -0,0 +1 @@ +command.unsupported=Liquibase MongoDB Extension does not support %s commands\nPlease refer to our documentation for the entire list of supported commands for MongoDB diff --git a/src/main/resources/www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-1.0.xsd b/src/main/resources/www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-1.0.xsd new file mode 100644 index 00000000..16b16850 --- /dev/null +++ b/src/main/resources/www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-1.0.xsd @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd b/src/main/resources/www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd new file mode 100644 index 00000000..16b16850 --- /dev/null +++ b/src/main/resources/www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/liquibase/ext/mongodb/changelog/MongoHistoryServiceTest.java b/src/test/java/liquibase/ext/mongodb/changelog/MongoHistoryServiceTest.java index e6ea7fc9..164f3ca3 100644 --- a/src/test/java/liquibase/ext/mongodb/changelog/MongoHistoryServiceTest.java +++ b/src/test/java/liquibase/ext/mongodb/changelog/MongoHistoryServiceTest.java @@ -87,9 +87,14 @@ void getDatabase() { void getExecutor() { final MongoLiquibaseDatabase database = new MongoLiquibaseDatabase(); historyService.setDatabase(database); - final Executor executor = historyService.getExecutor(); - assertThat(executor).isInstanceOf(NoSqlExecutor.class); - assertThat(historyService.getExecutor()).isSameAs(executor); + final Executor executor; + try { + executor = historyService.getExecutor(); + assertThat(executor).isInstanceOf(NoSqlExecutor.class); + assertThat(historyService.getExecutor()).isSameAs(executor); + } catch (DatabaseException e) { + e.printStackTrace(); + } } @Test @@ -450,4 +455,4 @@ void countRanChangeSets() { void updateCheckSum() { } -} \ No newline at end of file +} diff --git a/src/test/java/liquibase/ext/mongodb/lockservice/MongoLockServiceTest.java b/src/test/java/liquibase/ext/mongodb/lockservice/MongoLockServiceTest.java index 1ff04ea6..5738aeb6 100644 --- a/src/test/java/liquibase/ext/mongodb/lockservice/MongoLockServiceTest.java +++ b/src/test/java/liquibase/ext/mongodb/lockservice/MongoLockServiceTest.java @@ -97,9 +97,14 @@ void getDatabase() { void getExecutor() { final MongoLiquibaseDatabase database = new MongoLiquibaseDatabase(); lockService.setDatabase(database); - final Executor executor = lockService.getExecutor(); - assertThat(executor).isInstanceOf(NoSqlExecutor.class); - assertThat(lockService.getExecutor()).isSameAs(executor); + final Executor executor; + try { + executor = lockService.getExecutor(); + assertThat(executor).isInstanceOf(NoSqlExecutor.class); + assertThat(lockService.getExecutor()).isSameAs(executor); + } catch (DatabaseException e) { + e.printStackTrace(); + } } @Test diff --git a/src/test/resources/liquibase/ext/changelog.admin-command.test.xml b/src/test/resources/liquibase/ext/changelog.admin-command.test.xml index 0fcc3ab9..cf44437c 100644 --- a/src/test/resources/liquibase/ext/changelog.admin-command.test.xml +++ b/src/test/resources/liquibase/ext/changelog.admin-command.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.changeTypesMix.xml b/src/test/resources/liquibase/ext/changelog.changeTypesMix.xml index 43257bf0..6f6f462c 100644 --- a/src/test/resources/liquibase/ext/changelog.changeTypesMix.xml +++ b/src/test/resources/liquibase/ext/changelog.changeTypesMix.xml @@ -1,9 +1,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.changeTypesMix_rollback.xml b/src/test/resources/liquibase/ext/changelog.changeTypesMix_rollback.xml index 212b9f2a..bbb89e77 100644 --- a/src/test/resources/liquibase/ext/changelog.changeTypesMix_rollback.xml +++ b/src/test/resources/liquibase/ext/changelog.changeTypesMix_rollback.xml @@ -1,9 +1,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.create-collection.test.xml b/src/test/resources/liquibase/ext/changelog.create-collection.test.xml index bab53678..24883518 100644 --- a/src/test/resources/liquibase/ext/changelog.create-collection.test.xml +++ b/src/test/resources/liquibase/ext/changelog.create-collection.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.create-index.test.xml b/src/test/resources/liquibase/ext/changelog.create-index.test.xml index 3ba9677b..ccc387e0 100644 --- a/src/test/resources/liquibase/ext/changelog.create-index.test.xml +++ b/src/test/resources/liquibase/ext/changelog.create-index.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.create-users.test.xml b/src/test/resources/liquibase/ext/changelog.create-users.test.xml index 4ff1fe31..3a8f43e8 100644 --- a/src/test/resources/liquibase/ext/changelog.create-users.test.xml +++ b/src/test/resources/liquibase/ext/changelog.create-users.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.drop-users.test.xml b/src/test/resources/liquibase/ext/changelog.drop-users.test.xml index 4b6d270c..cfd44e5e 100644 --- a/src/test/resources/liquibase/ext/changelog.drop-users.test.xml +++ b/src/test/resources/liquibase/ext/changelog.drop-users.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.implicit-rollback.test.xml b/src/test/resources/liquibase/ext/changelog.implicit-rollback.test.xml index 3f89870c..7042dea3 100644 --- a/src/test/resources/liquibase/ext/changelog.implicit-rollback.test.xml +++ b/src/test/resources/liquibase/ext/changelog.implicit-rollback.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.insert-many.test.xml b/src/test/resources/liquibase/ext/changelog.insert-many.test.xml index 89eccf3c..4825fdbb 100644 --- a/src/test/resources/liquibase/ext/changelog.insert-many.test.xml +++ b/src/test/resources/liquibase/ext/changelog.insert-many.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.insert-one.test.xml b/src/test/resources/liquibase/ext/changelog.insert-one.test.xml index 42782cc2..72f442c8 100644 --- a/src/test/resources/liquibase/ext/changelog.insert-one.test.xml +++ b/src/test/resources/liquibase/ext/changelog.insert-one.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.insert-precondition.test.xml b/src/test/resources/liquibase/ext/changelog.insert-precondition.test.xml index c1ba5bc0..d54dfc02 100644 --- a/src/test/resources/liquibase/ext/changelog.insert-precondition.test.xml +++ b/src/test/resources/liquibase/ext/changelog.insert-precondition.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.insert-tags.test.xml b/src/test/resources/liquibase/ext/changelog.insert-tags.test.xml index 79b5edf2..3fb30c5b 100644 --- a/src/test/resources/liquibase/ext/changelog.insert-tags.test.xml +++ b/src/test/resources/liquibase/ext/changelog.insert-tags.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.rollback-insert-many.test.xml b/src/test/resources/liquibase/ext/changelog.rollback-insert-many.test.xml index 538310f8..dab1423a 100644 --- a/src/test/resources/liquibase/ext/changelog.rollback-insert-many.test.xml +++ b/src/test/resources/liquibase/ext/changelog.rollback-insert-many.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/ext/changelog.run-command.test.xml b/src/test/resources/liquibase/ext/changelog.run-command.test.xml index a19e2813..b22208b2 100644 --- a/src/test/resources/liquibase/ext/changelog.run-command.test.xml +++ b/src/test/resources/liquibase/ext/changelog.run-command.test.xml @@ -20,9 +20,9 @@ + http://www.liquibase.org/xml/ns/mongodb http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/adminCommand.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/adminCommand.xml index 774a580e..aab0272a 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/adminCommand.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/adminCommand.xml @@ -2,11 +2,11 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createCollection.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createCollection.xml index 6808f43f..e7a44657 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createCollection.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createCollection.xml @@ -2,15 +2,15 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> create_collection_comment - \ No newline at end of file + diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createIndex.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createIndex.xml index 5c58c098..4d149e12 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createIndex.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/createIndex.xml @@ -2,11 +2,11 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> @@ -73,4 +73,4 @@ - \ No newline at end of file + diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropCollection.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropCollection.xml index 7fd3c47d..88e138e7 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropCollection.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropCollection.xml @@ -2,11 +2,11 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.json b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.json index b0cae5de..962f2482 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.json +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.json @@ -94,12 +94,6 @@ "name": 1, "type": 1 } - }, - "options": { - "$rawJson": { - "unique": true, - "name": "ui_countries_json" - } } } } @@ -108,4 +102,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.xml index a4b78b26..b0a40a03 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.xml @@ -2,11 +2,11 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> @@ -77,12 +77,9 @@ { name: 1, type: 1} - - {unique: true, name: "ui_countries"} - - \ No newline at end of file + diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.yaml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.yaml index 0cc31e7e..626d04c9 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.yaml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/dropIndex.yaml @@ -63,5 +63,4 @@ databaseChangeLog: - dropIndex: collectionName: countries_yaml keys: '{ name: 1, type: 1}' - options: '{unique: true, name: "ui_countries"}' - - rollback: \ No newline at end of file + - rollback: diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertMany.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertMany.xml index dcd0b329..49773378 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertMany.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertMany.xml @@ -2,11 +2,11 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> @@ -62,4 +62,4 @@ - \ No newline at end of file + diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertOne.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertOne.xml index b34593f9..89c7469f 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertOne.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/insertOne.xml @@ -2,11 +2,11 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> create_collection_comment @@ -41,4 +41,4 @@ - \ No newline at end of file + diff --git a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/runCommand.xml b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/runCommand.xml index a95f6fdd..58290eba 100644 --- a/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/runCommand.xml +++ b/src/test/resources/liquibase/harness/compatibility/foundational/changelogs/nosql/runCommand.xml @@ -2,11 +2,11 @@ + http://www.liquibase.org/xml/ns/mongodb + http://www.liquibase.org/xml/ns/mongodb/liquibase-mongodb-latest.xsd"> @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/test-project/pom.xml b/test-project/pom.xml index e8742ea6..833b7f64 100644 --- a/test-project/pom.xml +++ b/test-project/pom.xml @@ -48,7 +48,7 @@ 1.3 3.19.0 2.12.7.1 - 1.31 + 2.0