Question: Is it possible to create a new DB in a migration script and then connect to it? How?
My Scenario: I\'m trying to use flyw
If u have schema database creation command in V1 of your scripts, flyway can generate it but not database:
flyway -baselineOnMigrate=true -url=jdbc:mysql://localhost/ -schemas=test_db -user=root -password=root_pass -locations=filesystem:/path/to/scrips/ migrate
and similar to this in the script file:
DROP SCHEMA IF EXISTS `test_db` ;
CREATE SCHEMA `test_db` COLLATE utf8_general_ci ;