Class DatabaseMigrations
java.lang.Object
com.soulfiremc.server.database.DatabaseMigrations
Handles database migrations that need to run before Hibernate initializes.
These migrations handle schema changes that Hibernate's hbm2ddl.auto=update cannot handle,
such as column renames and enum value updates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrunMigrations(Connection connection, boolean isSqlite) Runs all necessary migrations on the given database connection.
-
Method Details
-
runMigrations
Runs all necessary migrations on the given database connection. Migrations are idempotent - they check if changes are needed before applying.- Parameters:
connection- the database connectionisSqlite- true if using SQLite, false for MySQL/MariaDB
-