Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing CHANGELOG.md and pom.xml / fixed YdbJdbcTemplate imports #118

Merged
merged 4 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions flyway-dialect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## 1.0.0-RC0 ##

* Implementation distributed lock
* Supported main commands how `migration`, `info`, `validate`, `baseline`, `clean`, `repair`
* Mock YDB schema which it doesn't support (<= 24.1)
* Extension JdbcTemplate via YdbJdbcTemplate
* Implementation of all main classes from packages `org.flywaydb.core.internal.database.base`
83 changes: 75 additions & 8 deletions flyway-dialect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,35 @@

<groupId>tech.ydb</groupId>
<artifactId>flyway-dialect</artifactId>
<version>0.9.1-SNAPSHOT</version>
<version>1.0.0-RC0</version>

<name>Flyway YDB Dialect</name>
<description>Support Flyway YDB Dialect</description>
<url>https://github.com/ydb-platform/ydb-java-dialects</url>

<packaging>jar</packaging>

<developers>
<developer>
<name>Kirill Kurdyukov</name>
<email>[email protected]</email>
<organization>YDB</organization>
<organizationUrl>https://ydb.tech/</organizationUrl>
</developer>
</developers>

<scm>
<url>https://github.com/ydb-platform/ydb-java-dialects</url>
<connection>scm:git:https://github.com/ydb-platform/ydb-java-dialects.git</connection>
<developerConnection>scm:git:https://github.com/ydb-platform/ydb-java-dialects.git</developerConnection>
</scm>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand Down Expand Up @@ -41,12 +69,6 @@
<groupId>tech.ydb.test</groupId>
<artifactId>ydb-junit5-support</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</exclusion>
</exclusions>
<version>2.2.0</version>
</dependency>
<dependency>
Expand All @@ -64,7 +86,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<source>1.8</source>
<source>17</source>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -100,4 +122,49 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>ossrh-s01</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh-s01</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import java.sql.SQLException;
import java.sql.Types;
import org.flywaydb.core.internal.database.DatabaseType;
import org.flywaydb.core.internal.jdbc.JdbcTemplate;
import static org.flywaydb.core.internal.jdbc.JdbcNullTypes.BooleanNull;
import static org.flywaydb.core.internal.jdbc.JdbcNullTypes.IntegerNull;
import static org.flywaydb.core.internal.jdbc.JdbcNullTypes.StringNull;
import org.flywaydb.core.internal.jdbc.JdbcTemplate;

/**
* @author Kirill Kurdyukov
*/
public class YdbJdbcTemplate extends JdbcTemplate {
public class YdbJdbcTemplate extends JdbcTemplate {

public YdbJdbcTemplate(Connection connection, DatabaseType databaseType) {
super(connection, databaseType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Kirill Kurdyukov
*/
public class YdbFlywayMigrationTest extends YdbFlywayBaseTest {

private static final Logger logger = LoggerFactory.getLogger(YdbFlywayMigrationTest.class);

private static final String[] EVOLUTION_SCHEMA_MIGRATION_DIRS = new String[]{
"migration-step-1", "migration-step-2",
"migration-step-3", "migration-step-4",
Expand Down Expand Up @@ -57,5 +62,13 @@ void evolutionConcurrencySchemaTest() throws ExecutionException, InterruptedExce
taskFuture.get();
}
}

threadPool.shutdown();

try {
threadPool.awaitTermination(10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
threadPool.shutdownNow();
}
}
}
14 changes: 1 addition & 13 deletions flyway-dialect/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,8 @@
</Console>
</Appenders>
<Loggers>
<Root level="debug">
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
<Logger name="io.grpc" level="info" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="com.github" level="info" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="org.testcontainers" level="info" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
<Logger name="tech.ydb" level="info" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
</Loggers>
</Configuration>
12 changes: 6 additions & 6 deletions liquibase-dialect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 1.0.2 ##

* Added duration format for `Interval` type and ISO for time types when loading data into tables.
* Added duration format for `Interval` type and ISO for time types when loading data into tables

## 1.0.1 ##

Expand All @@ -24,7 +24,7 @@

## 0.9.5 ##

* Supported loadData and loadUpdateData from CSV file.
* Supported loadData and loadUpdateData from CSV file

## 0.9.4 ##

Expand All @@ -36,10 +36,10 @@

## 0.9.2 ##

* Fixed bug with NullPointerException in CREATE INDEX generator method.
* Fixed bug with NullPointerException in CREATE INDEX generator method

## 0.9.1 ##

* Supported "CREATE TABLE", "ALTER TABLE", "DROP TABLE" and "CREATE INDEX" SQL statements from .xml, .json and .yaml file formats.
* Added support for YDB primitive data types.
* Included support for DATABASECHANGELOG and DATABASECHANGELOGLOCK tables.
* Supported "CREATE TABLE", "ALTER TABLE", "DROP TABLE" and "CREATE INDEX" SQL statements from .xml, .json and .yaml file formats
* Added support for YDB primitive data types
* Included support for DATABASECHANGELOG and DATABASECHANGELOGLOCK tables
Loading