From b27989f54128114059d03bc2f0b44c9d746c964c Mon Sep 17 00:00:00 2001
From: Robin Bygrave
+ * This does not run the migration or ddl scripts but just generates them. + *
+ *{@code
+ *
+ * DbMigration migration = new DbMigration();
+ * migration.setPathToResources("src/main/resources");
+ * migration.setPlatform(DbPlatformName.ORACLE);
+ *
+ * migration.generateMigration();
+ *
+ * }
*/
public class DbMigration {
@@ -131,9 +143,36 @@ public class DbMigration {
}
/**
- * Run the migration generating the next migration xml file and associated apply and rollback sql scripts.
+ * Generate the next migration xml file and associated apply and rollback sql scripts.
+ * + * This does not run the migration or ddl scripts but just generates them. + *
+ *{@code
+ *
+ * DbMigration migration = new DbMigration();
+ * migration.setPathToResources("src/main/resources");
+ * migration.setPlatform(DbPlatformName.ORACLE);
+ *
+ * migration.generateMigration();
+ *
+ * }
+ *
+ * {@code
+ *
+ * DbMigration migration = new DbMigration();
+ * migration.setPathToResources("src/main/resources");
+ *
+ * migration.addPlatform(DbPlatformName.POSTGRES, "pg");
+ * migration.addPlatform(DbPlatformName.MYSQL, "mysql");
+ * migration.addPlatform(DbPlatformName.ORACLE, "mysql");
+ *
+ * migration.generateMigration();
+ *
+ * }
*/
- public void runMigration() throws IOException {
+ public void generateMigration() throws IOException {
// use this flag to stop other plugins like full DDL generation
DbOffline.setRunningMigration();