Kotlin: Database Migration – Harmonica 0.0.4

Warning: Parameter 2 to qtranxf_postsFilter() expected to be a reference, value given in /home/and-beyond/www/main/wp-includes/class-wp-hook.php on line 286

I tried to create Kotlin database migration library.

I released version 0.0.4 at GitHub. It is not fully developed yet.

You can find it also at Gradle Plugin page.

How to use


It requires JDBC driver, and kotlin-script-util library.

If you use PostgreSQL …

Directory Structure and Configuration File

It requires src/main/kotlin/db and its subdirectories, config and migration. It will be able to be changed in later release.

Directory Structure

And it needs DB configuration.

It must not include package description, because it is executed as Kotlin script.

Create Migration

Execute harmonicaCreate task.

If you specify migration name, execute as follows.

Then, migration file will be created into the migration directory.

Sample Migration