Skip to content

Commit

Permalink
Migration tool (#603)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriele Favaretto <[email protected]>
Co-authored-by: Renato Cavalcanti <[email protected]>
Co-authored-by: Arsene Tochemey GANDOTE <[email protected]>
  • Loading branch information
3 people authored Nov 9, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 8cb9192 commit c56753d
Showing 49 changed files with 1,631 additions and 207 deletions.
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

jobs:
1 change: 1 addition & 0 deletions .github/workflows/h2-test.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

jobs:
1 change: 1 addition & 0 deletions .github/workflows/mysql-tests.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

jobs:
1 change: 1 addition & 0 deletions .github/workflows/oracle-tests.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

jobs:
1 change: 1 addition & 0 deletions .github/workflows/postgres-tests.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

jobs:
1 change: 1 addition & 0 deletions .github/workflows/sqlserver-tests.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- migration-tool # remove before merging to master
tags-ignore: [ v.* ]

jobs:
16 changes: 10 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import com.lightbend.paradox.apidoc.ApidocPlugin.autoImport.apidocRootPackage

// FIXME remove switching to final Akka version
resolvers in ThisBuild += "Akka Snapshots".at("https://oss.sonatype.org/content/repositories/snapshots/")
ThisBuild / resolvers += "Akka Snapshots".at("https://oss.sonatype.org/content/repositories/snapshots/")

lazy val `akka-persistence-jdbc` = project
.in(file("."))
.enablePlugins(ScalaUnidocPlugin)
.disablePlugins(MimaPlugin, SitePlugin)
.aggregate(core, migration, docs)
.aggregate(core, docs, migrator)
.settings(publish / skip := true)

lazy val core = project
@@ -24,13 +24,17 @@ lazy val core = project
organization.value %% name.value % previousStableVersion.value.getOrElse(
throw new Error("Unable to determine previous version for MiMa"))))

lazy val migration = project
.in(file("migration"))
lazy val migrator = project
.in(file("migrator"))
.disablePlugins(SitePlugin, MimaPlugin)
.configs(IntegrationTest.extend(Test))
.settings(Defaults.itSettings)
.settings(
name := "akka-persistence-jdbc-migration",
libraryDependencies ++= Dependencies.Migration,
name := "akka-persistence-jdbc-migrator",
libraryDependencies ++= Dependencies.Migration ++ Dependencies.Libraries,
// TODO remove this when ready to publish it
publish / skip := true)
.dependsOn(core % "compile->compile;test->test")

lazy val docs = project
.enablePlugins(ProjectAutoPlugin, AkkaParadoxPlugin, ParadoxSitePlugin, PreprocessPlugin, PublishRsyncPlugin)
Empty file.

This file was deleted.

21 changes: 0 additions & 21 deletions migration/src/main/resources/logback.xml

This file was deleted.

9 changes: 0 additions & 9 deletions migration/src/main/resources/reference.conf

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions migration/src/test/resources/postgres/init.sql

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package akka.persistence.jdbc.migrator.integration

import akka.persistence.jdbc.migrator.MigratorSpec._
import akka.persistence.jdbc.migrator.JournalMigratorTest

class PostgresJournalMigratorTest extends JournalMigratorTest("postgres-application.conf") with PostgresCleaner

class MySQLJournalMigratorTest extends JournalMigratorTest("mysql-application.conf") with MysqlCleaner

class OracleJournalMigratorTest extends JournalMigratorTest("oracle-application.conf") with OracleCleaner

class SqlServerJournalMigratorTest extends JournalMigratorTest("sqlserver-application.conf") with SqlServerCleaner
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package akka.persistence.jdbc.migrator.integration

import akka.persistence.jdbc.migrator.MigratorSpec._
import akka.persistence.jdbc.migrator.SnapshotMigratorTest

class PostgresSnapshotMigratorTest extends SnapshotMigratorTest("postgres-application.conf") with PostgresCleaner

class MySQLSnapshotMigratorTest extends SnapshotMigratorTest("mysql-application.conf") with MysqlCleaner

class OracleSnapshotMigratorTest extends SnapshotMigratorTest("oracle-application.conf") with OracleCleaner

class SqlServerSnapshotMigratorTest extends SnapshotMigratorTest("sqlserver-application.conf") with SqlServerCleaner
Loading

0 comments on commit c56753d

Please sign in to comment.