Class SkinnedRatOrmMigrator

java.lang.Object
com.serinity.accesscontrol.migration.SkinnedRatOrmMigrator

public final class SkinnedRatOrmMigrator extends Object
Database schema migration utility for the Access Control module.

This class is responsible for managing schema generation using skinned-rat-orm. It performs a full migration cycle by dropping existing tables and recreating them in the correct order based on entity relationships.

The migration targets the MySQL dialect and operates on the following entities:

WARN: This operation is destructive. All existing tables mapped to the above entities will be permanently dropped before being recreated. It is intended for development, testing, or controlled reset scenarios, not for production environments unless explicitly required.

The migration process relies on:

  • SkinnedRatOrmEntityManager for database connection handling
  • SchemaGenerator for DDL operations
  • SQLDialect.MYSQL as the configured SQL dialect
Since:
2026-02-15 SkinnedRatOrmMigrator.java
Version:
1.0
Author:
@ZouariOmar (zouariomar20@gmail.com)
  • Method Details

    • migrate

      public static void migrate()
      Runs the full schema migration: drops all managed tables then recreates them in dependency order.

      WARN: This is a destructive operation. All existing data in the managed tables will be permanently lost.

      Throws:
      RuntimeException - if any DDL operation fails