mysql - Flyway:init doesn't create schema database -


i'm using flyway manage multi-schema database in mysql , i've configured flyway using maven. have listed database called 'metadata' first in <schemas> tag flyway put schema_version table here. when run mvn flyway:migrate i'm expecting table and metadata database created. flyway 2.1.1 tries create table, not create database first fails.

 [debug] schemas: metadata,temp,other_dbs_redacted [debug] schema `temp` exists. skipping schema creation. [debug] database: mysql 5.6   [error] com.googlecode.flyway.core.api.flywayexception: error setting current sc hema `metadata` [error] caused com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: unk nown database 'metadata' 

i thought mvn flyway:init might create schemas, fails different related error.

 [info] --- flyway-maven-plugin:2.1.1:init (default-cli) @ database --- [info] creating metadata table: `metadata`.`schema_version` [error] com.googlecode.flyway.core.api.flywayexception: error executing statement @ line 17: create table `metadata`.`schema_version` (     `version_rank` int not null,     `installed_rank` int not null,     `version` varchar(50) not null,     `description` varchar(200) not null,     `type` varchar(20) not null,     `script` varchar(1000) not null,     `checksum` int,     `installed_by` varchar(100) not null,     `installed_on` timestamp not null default current_timestamp,     `execution_time` int not null,     `success` bool not null ) engine=innodb [error] caused com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception: unknown database 'metadata' 

if create database metadata things proceed smoothly. i'm quite enjoying flyway in fact. short of running sql manually, there way make flyway create database? bug?

tia

right create schema support or nothing thing. if schemas missing, created, otherwise none created.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -