Skip to main content
Permission: emf.admin.debug.database

Database Migration

EMF uses flyway to automatically migrate the database. Normally you shouldn't need to manually migrate the database. In case things breaks you can use some commands to try and fix the issues.

/emf admin database reset is intentionally protected by a confirmation step. Run it once to arm it, then run the same command again within 30 seconds to actually clear EMF data tables.

Permission emf.admin.debug.database.flyway
CommandDescriptionPermission
/emf admin database drop-flywayDrops the Flyway schema history tableemf.admin.debug.database.flyway
/emf admin database repair-flywayRuns the Flyway repair commandemf.admin.debug.database.flyway
/emf admin database clean-flywayRuns the Flyway clean commandemf.admin.debug.database.flyway
/emf admin database migrate-to-latestAttempts to migrate the database to the latest versionemf.admin.debug.database.migrate
/emf admin database resetClears EMF data tables after a 30-second confirmationemf.admin.debug.database.reset
Dangerous command

/emf admin database reset removes EMF-managed database rows and resets identities. It does not use Flyway clean, and it should only be used when you explicitly want to wipe stored EMF data.

Migrating from Database V2​

Not sure what database version you have?

Try running /emf admin version

Running the /emf admin migrate will attempt to migrate from database version 2 to the latest version.