Package tilda.migration
Class Migrator
- java.lang.Object
-
- tilda.migration.Migrator
-
public class Migrator extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.logging.log4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description Migrator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MigrationDataModel
AnalyzeDatabase(Connection C, boolean checkOnly, java.util.List<Schema> tildaList, DatabaseMeta DBMeta)
protected static void
applyMigration(Connection C, MigrationDataModel migrationData, java.lang.String[] DependencySchemas, DatabaseMeta DBMeta)
protected static void
checkZoneInfo(Connection C, java.util.List<Schema> TildaList, DatabaseMeta DBMeta)
protected static void
confirmMigration(Connection C)
protected static java.util.List<MigrationAction>
getMigrationActions(Connection C, CodeGenSql CGSQL, Schema S, java.util.List<Schema> TildaList, DatabaseMeta DBMeta)
protected static void
handleColumnRename(DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions, MigrationRename MR, TableMeta TM)
protected static boolean
handleColumnTypes(Connection C, Column Col, ColumnMeta CMeta, java.util.List<MigrationAction> Actions, ColumnAlterMulti CAM)
protected static void
handleIndices(java.util.List<MigrationAction> Actions, java.util.List<java.lang.String> Errors, Object Obj, TableMeta TMeta)
protected static void
handleKeys(java.util.List<Schema> TildaList, java.util.List<MigrationAction> Actions, java.util.List<java.lang.String> Errors, Object Obj, TableMeta TMeta)
protected static void
handleMoves(Connection C, Schema S, DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions)
protected static void
handleRenames(Schema S, DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions)
protected static void
handleTableMove(Schema S, DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions, MigrationMove MM, Object obj)
static void
MigrateDatabase(Connection C, boolean CheckOnly, java.util.List<Schema> TildaList, DatabaseMeta DBMeta, boolean first, java.util.List<java.lang.String> connectionUrls, java.lang.String[] DependencySchemas)
static void
PrintDiscrepancies(Connection C, MigrationDataModel migrationData, java.lang.String[] DependencySchemas)
-
-
-
Method Detail
-
MigrateDatabase
public static void MigrateDatabase(Connection C, boolean CheckOnly, java.util.List<Schema> TildaList, DatabaseMeta DBMeta, boolean first, java.util.List<java.lang.String> connectionUrls, java.lang.String[] DependencySchemas) throws java.lang.Exception
- Throws:
java.lang.Exception
-
checkZoneInfo
protected static void checkZoneInfo(Connection C, java.util.List<Schema> TildaList, DatabaseMeta DBMeta) throws java.lang.Exception
- Throws:
java.lang.Exception
-
PrintDiscrepancies
public static void PrintDiscrepancies(Connection C, MigrationDataModel migrationData, java.lang.String[] DependencySchemas) throws java.lang.Exception
- Throws:
java.lang.Exception
-
AnalyzeDatabase
public static MigrationDataModel AnalyzeDatabase(Connection C, boolean checkOnly, java.util.List<Schema> tildaList, DatabaseMeta DBMeta) throws java.lang.Exception
- Throws:
java.lang.Exception
-
confirmMigration
protected static void confirmMigration(Connection C) throws java.lang.Exception
- Throws:
java.lang.Exception
-
applyMigration
protected static void applyMigration(Connection C, MigrationDataModel migrationData, java.lang.String[] DependencySchemas, DatabaseMeta DBMeta) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getMigrationActions
protected static java.util.List<MigrationAction> getMigrationActions(Connection C, CodeGenSql CGSQL, Schema S, java.util.List<Schema> TildaList, DatabaseMeta DBMeta) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleRenames
protected static void handleRenames(Schema S, DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleColumnRename
protected static void handleColumnRename(DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions, MigrationRename MR, TableMeta TM) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleMoves
protected static void handleMoves(Connection C, Schema S, DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleTableMove
protected static void handleTableMove(Schema S, DatabaseMeta DBMeta, java.util.List<MigrationAction> Actions, MigrationMove MM, Object obj) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleColumnTypes
protected static boolean handleColumnTypes(Connection C, Column Col, ColumnMeta CMeta, java.util.List<MigrationAction> Actions, ColumnAlterMulti CAM) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleKeys
protected static void handleKeys(java.util.List<Schema> TildaList, java.util.List<MigrationAction> Actions, java.util.List<java.lang.String> Errors, Object Obj, TableMeta TMeta) throws java.lang.Exception
- Throws:
java.lang.Exception
-
handleIndices
protected static void handleIndices(java.util.List<MigrationAction> Actions, java.util.List<java.lang.String> Errors, Object Obj, TableMeta TMeta)
-
-