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
Infrastructure Type/Provider: Websphere Application Server (prod environment), Tomcat (local development)
Description
When deploying locally (spring boot / tomcat), or running a local updateSQL task, my changeset file pathing for changesets under the includeAll tag differ from the file pathing that Liquibase uses in a deployed WAR file:
As a result of this, if I manually run the generated updateSQL script against the database, then deploy my application with Liquibase enabled, the changesets under includeAll are attempted again and the deployment fails due to the DB objects already existing.
Steps To Reproduce
Create a Spring Boot / Gradle project
Create a changeset file and add it to changelog-master under includeAll
bootRun and check the logs or DB for the filename resource being referenced
Deploy the application as a WAR and check the logs or DB for the filename resource being referenced
Compare steps 3 and 4, as the pathing differs
Actual Behavior
Relevant Logging from local bootRun:
[DirectJDKLog.java:180] Initializing Spring embedded WebApplicationContext
l.lockservice [JavaLogger.java:23] Successfully acquired change log lock
l.changelog [JavaLogger.java:23] Reading resource: db/changelog/local/changes/sqlscripts/liquibase-changelog-1.0.h2.sql
l.changelog [JavaLogger.java:23] Creating database history table with name: MUNI.DATABASECHANGELOG
l.changelog [JavaLogger.java:23] Reading from MUNI.DATABASECHANGELOG
Relevant Logging from deployed WAR File to Websphere:
The resource being read in for our changelog files under includeAll differs between the two environments. This is causing conflict when running our database script manually because this is what gets added to the DATABASECHANGELOG.FILENAME column.
Expected/Desired Behavior
The resource path being read in should be the same.
Additional Context
We're only experiencing this issue with changesets under includeAll
- includeAll:
path:
include works as expected:
- include:
file:
It appears that DatabaseChangelog.includeAll is what's responsible for parsing this path, but I'm unsure why the pathing differs in the context of a deployed WAR.
Our only solution as of right now is to use include rather than includeAll, but we would prefer to use includeAll as our scripts underneath that location are generated automatically.
Please let me know if any additional information is needed, or if I'm misunderstanding / mis-using something.
The text was updated successfully, but these errors were encountered:
This is really annoying.
If someone runs locally to a shared database, like a dev env database, when the app is actually deployed, it tries to run the file again because it's a different path =/
Environment
Liquibase Version:
4.3.5
Liquibase Integration & Version:
Gradle 7.1.1
,Spring Boot 2.5.2
Liquibase Extension(s) & Version:
Liquibase Groovy DSL 3.0.1
Database Vendor & Version:
H2 1.3.174
,Oracle 11G
Operating System Type & Version:
Windows
Infrastructure Type/Provider:
Websphere Application Server
(prod environment),Tomcat
(local development)Description
When deploying locally (spring boot / tomcat), or running a local
updateSQL
task, my changeset file pathing for changesets under theincludeAll
tag differ from the file pathing that Liquibase uses in a deployed WAR file:Relevant changelog-master tag:
Deployed WAR resource path:
Local bootRun resource path:
As a result of this, if I manually run the generated updateSQL script against the database, then deploy my application with Liquibase enabled, the changesets under
includeAll
are attempted again and the deployment fails due to the DB objects already existing.Steps To Reproduce
includeAll
Actual Behavior
Relevant Logging from local bootRun:
Relevant Logging from deployed WAR File to Websphere:
The resource being read in for our changelog files under
includeAll
differs between the two environments. This is causing conflict when running our database script manually because this is what gets added to theDATABASECHANGELOG.FILENAME
column.Expected/Desired Behavior
The resource path being read in should be the same.
Additional Context
We're only experiencing this issue with changesets under
includeAll
include
works as expected:It appears that
DatabaseChangelog.includeAll
is what's responsible for parsing this path, but I'm unsure why the pathing differs in the context of a deployed WAR.Our only solution as of right now is to use
include
rather thanincludeAll
, but we would prefer to useincludeAll
as our scripts underneath that location are generated automatically.Please let me know if any additional information is needed, or if I'm misunderstanding / mis-using something.
The text was updated successfully, but these errors were encountered: