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.
-
ClassDescriptionA migration written in Java, for a change SQL cannot express: recomputing a column, moving data between tables with logic in between.What one
Migrator.migrate()call did.What aJavaMigrationmay do to the database it is migrating.A migration run that was refused or failed.One row ofMigrator.info(): a migration this build carries, one the database recorded, or both.A named group of migrations with its own history table.Collects the migrations of a set.Where one migration stands, as reported byMigrator.info().Runs oneMigrationSetagainst one database.