Fabio Ebner
Fabio Ebner

Reputation: 2783

How use only one schema on flyway

I need to work only with one schema on flyway.

but when i use

        Flyway flyway = new Flyway();
    flyway.setDataSource(ConectorWatson);
    flyway.setSchemas("db_watson");
    flyway.migrate();

the flyway create one schema_version on my pulic schema and db_watson.

can i only use db_watson ?

tks

Upvotes: 2

Views: 241

Answers (1)

Axel Fontaine
Axel Fontaine

Reputation: 35169

Flyway only creates a schema_version table in the first schema configured. This defaults to the one of the connection. When you set flyway.setSchemas() it changes it to the first of that list, and uses that one.

In your case this means, with the configuration you have there, Flyway only creates a schema_version table in the db_watson schema.

If you noticed something different, please file an issue with exact steps to reproduce.

Upvotes: 1

Related Questions