Class SQLDatabaseMigrator

java.lang.Object
org.sgrewritten.stargate.migration.SQLDatabaseMigrator

public class SQLDatabaseMigrator extends Object
Helps with running sql database migrations by reading sql files. - Can read multiple queries in the same file - Can parse already defined stargate SQL statements and run them (in the same file)
  • Constructor Details

    • SQLDatabaseMigrator

      public SQLDatabaseMigrator(@NotNull @NotNull SQLDatabaseAPI database, @NotNull @NotNull TableNameConfiguration nameConfiguration, @NotNull @NotNull String sqlFilesPath, boolean interServerEnabled)
      Parameters:
      database -

      A database api able to provide sql statements

      nameConfiguration -

      SQL table name config

      sqlFilesPath -

      The internal resource path to the SQL files to run

      interServerEnabled -

      Whether inter server portals are enabled

  • Method Details