Package com.codename1.migration


package com.codename1.migration

Versioned database migrations, shared by applications and the Codename One backend.

A migration is a script named V<version>__<description>.sql, or a JavaMigration. Each one runs exactly once per database, in version order, and is recorded with a checksum in a history table, so a database can always be brought from whatever version it is at to the one the running build expects. The file naming, the commands and the flyway_schema_history table follow Flyway.

Start from the runtime's Migrations class, which hands out a Migrator: com.codename1.db.Migrations in an application and com.codename1.backend.Migrations on a server. A MigrationSet groups the migrations that share one history table.