You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL causes SQLWarnings when DDL statements have side-effects. In these cases, the SQLState and ErrorCode are both zero. According to SQL-92, a SQLState of 00 means success.
Since All SQLWarning objects are logged by flyway at the WARN level, it makes it difficult to filter out non-errors and appears confusing to end-users. Logging successful states at the INFO level would be more helpful.
The relevant logging code is in org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement()
Reproduction:
v_1__foo.sql:
CREATE TABLE foo (id int);
ALTER TABLE foo ADD CONSTRAINT foo_pkey PRIMARY KEY (id);
log message:
WARN o.f.c.i.dbsupport.JdbcTemplate - ALTER TABLE / ADD PRIMARY KEY will create implicit index "foo_pkey" for table "foo" (SQL State: 00000 - Error Code: 0)
The text was updated successfully, but these errors were encountered:
I'm attempting to test a patch but the documented way of omitting commercial databases doesn't seem to work.
I tried mvn install -PNoInstallableDBTest -P-CommercialDBJars from the root of the project as documented on http://flywaydb.org/contribute/code/database.html and I also tried from within the flyway-core submodule. In either case, maven warned that, "The requested profile "NoInstallableDBTest" could not be activated because it does not exist." It also failed to build because it tried to include commercial jar dependencies which I don't have access to.
Since I can't build against master, I forked flyway-3.0 and applied a patch. It seems to be correctly logging information messages at the INFO level with my software.
I'll paste the patch here. Feel free to apply it. I can submit a pull request once it is possible to build master again.
PostgreSQL causes SQLWarnings when DDL statements have side-effects. In these cases, the SQLState and ErrorCode are both zero. According to SQL-92, a SQLState of 00 means success.
Since All SQLWarning objects are logged by flyway at the WARN level, it makes it difficult to filter out non-errors and appears confusing to end-users. Logging successful states at the INFO level would be more helpful.
The relevant logging code is in org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement()
Reproduction:
v_1__foo.sql:
CREATE TABLE foo (id int);
ALTER TABLE foo ADD CONSTRAINT foo_pkey PRIMARY KEY (id);
log message:
WARN o.f.c.i.dbsupport.JdbcTemplate - ALTER TABLE / ADD PRIMARY KEY will create implicit index "foo_pkey" for table "foo" (SQL State: 00000 - Error Code: 0)
The text was updated successfully, but these errors were encountered: