Skip to content

Commit

Permalink
chore: update migration guide (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
octonato committed May 2, 2024
1 parent 45bce78 commit 9b02b1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions docs/src/main/paradox/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ The previous version was using an auto-increment column as a primary key and for

While in `5.4.0`, the primary key and foreign key on the `event_tag` table have been replaced with a primary key from the `event_journal` table. In order to migrate to the new schema, we made a [**migration script**](https://github.com/akka/akka-persistence-jdbc/tree/master/core/src/main/resources/schema) which is capable of creating the new column, migrate the rows and add the new constraints.

By default, the plugin will behave as in previous version. If you want to use the new `event_tag` keys, you need to run a multiple-phase rollout:
By default, the plugin will behave as in previous version. However, it's required to add two new columns to the `event_tag` table. Before upgrading to `5.4.0`, make sure that you apply at least the first step of the [**migration script**](https://github.com/akka/akka-persistence-jdbc/tree/master/core/src/main/resources/schema).

1. apply the first part of the migration script and then redeploy your application with the default settings.
2. apply the second part of the migration script that will migrate the rows and adapt the constraints.
If you want to use the new `event_tag` keys, you need to run a multiple-phase rollout:

1. apply the first step of the migration script (as mentioned above) and then redeploy your application with the default settings after upgrading to version `5.4.0`.
2. apply the second step of the migration script that will migrate the rows and adapt the constraints.
3. redeploy the application by disabling the legacy-mode:

```config
Expand Down
11 changes: 6 additions & 5 deletions docs/src/main/paradox/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ Akka Persistence JDBC requires Akka $akka.version$ or later. It uses @extref:[Sl

## Version history

| Description | Version | Akka version |
|-------------|---------|--------------|
| New database schema, see @ref:[Migration](migration.md) | [5.0.0](https://github.com/akka/akka-persistence-jdbc/releases) | Akka 2.6.+ |
| First release within the Akka organization | [4.0.0](https://github.com/akka/akka-persistence-jdbc/releases/tag/v4.0.0) | Akka 2.6.+ |
| Requires Akka 2.5.0 | [3.5.3+](https://github.com/akka/akka-persistence-jdbc/releases/tag/v3.5.3) | Akka 2.5.23+ or 2.6.x |
| Description | Version | Akka version |
|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|--------------|
| Required database schema migration, see @ref:[Migration](migration.md#migrating-to-version-5-4-0) | [5.4.0](https://github.com/akka/akka-persistence-jdbc/releases/tag/v5.4.0) | Akka 2.6.+ |
| New database schema, see @ref:[Migration](migration.md#migrating-to-version-5-0-0) | [5.0.0](https://github.com/akka/akka-persistence-jdbc/releases/tag/v5.0.0) | Akka 2.6.+ |
| First release within the Akka organization | [4.0.0](https://github.com/akka/akka-persistence-jdbc/releases/tag/v4.0.0) | Akka 2.6.+ |
| Requires Akka 2.5.0 | [3.5.3+](https://github.com/akka/akka-persistence-jdbc/releases/tag/v3.5.3) | Akka 2.5.23+ or 2.6.x |

See the full release history at [GitHub releases](https://github.com/akka/akka-persistence-jdbc/releases).

Expand Down

0 comments on commit 9b02b1d

Please sign in to comment.