Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.4.2 CLI considers the applied changes as not applied when using liquibaseSchemaName. #2000

Closed
kdenis4 opened this issue Jul 23, 2021 · 6 comments · Fixed by #2006
Closed
Milestone

Comments

@kdenis4
Copy link

kdenis4 commented Jul 23, 2021

Environment

Liquibase Version: 4.4.2

Liquibase Integration & Version: CLI

Liquibase Extension(s) & Version:

Database Vendor & Version: Oracle 19c

Operating System Type & Version: Windows 10 using bash

Description

The latest version consider changelogs as not implemented, while they were implemented using previous Liquibase version

Steps To Reproduce

run the command using Liquibase 4.2.2

  • $ liquibase --defaultsFile=qa --changeLogFile=deploy/dba-2021.7/vs_master.xml --contexts=qa status
    Starting Liquibase at 15:32:11 (version 4.2.2 Fixes: CORE-1119, -1123, -1124, -1074, -1128 #36 built at 2020-12-09 20:07+0000)
    3 change sets have not been applied to LIQUIBASE@jdbc:oracle:thin:@reducted.oracle.server
    Liquibase command 'status' was executed successfully
  • run the same command using 4.4.2
    $ liquibase --defaultsFile=qa --changeLogFile=deploy/dba-2021.7/vs_master.xml --contexts=qa status
    Starting Liquibase at 15:31:54 (version 4.4.2 CORE-1032 Fix Metdata comment syntax for Formatted SQL Changelogs for MySQL #39 built at 2021-07-22 18:11+0000)
    Liquibase Version: 4.4.2
    Liquibase Community 4.4.2 by Datical
    7 change sets have not been applied to LIQUIBASE@jdbc:oracle:thin:@reducted.oracle.server

Actual Behavior

4.4.2 reports 7 changes have not been applied, but they actually were applied in 4.2.2 version before CLI update

Expected/Desired Behavior

All applied change sets should not be considered as not applied with Liquibase software updates

┆Issue is synchronized with this Jira Story by Unito

@molivasdat
Copy link
Contributor

Hi @kdenis4 Thanks for adding this issue. Can you provide a simple testcase/ changelog that shows this issue?

@kdenis4
Copy link
Author

kdenis4 commented Jul 26, 2021

Hi @molivasdat , please take a look
$ cat test.xml

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
                   xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd
                                       http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

<changeSet id="create table1" author="author1">
         <sql>
                  create table t1 (v varchar2(30));
                </sql>
                <rollback>
                 <sql>
                  drop table t1;
                 </sql>
                 </rollback>
   </changeSet>

</databaseChangeLog>```

$ liquibase --defaultsFile=qa --changeLogFile=test.xml status
Starting Liquibase at 09:37:58 (version 4.2.2 #36 built at 2020-12-09 20:07+0000)
1 change sets have not been applied to LIQUIBASE@jdbc:oracle:thin:@db_server
Liquibase command 'status' was executed successfully.

$ liquibase --defaultsFile=qa --changeLogFile=test.xml update
Liquibase Community 4.2.2 by Datical
Starting Liquibase at 09:38:54 (version 4.2.2 #36 built at 2020-12-09 20:07+0000)
Liquibase: Update has been successful.

$ liquibase --defaultsFile=qa --changeLogFile=test.xml status
Liquibase Community 4.2.2 by Datical
Starting Liquibase at 09:40:16 (version 4.2.2 #36 built at 2020-12-09 20:07+0000)
LIQUIBASE@jdbc:oracle:thin:@db_server is up to date
Liquibase command 'status' was executed successfully

on 4.4.2

$ liquibase --defaultsFile=qa --changeLogFile=test.xml status
Starting Liquibase at 09:41:09 (version 4.4.2 #39 built at 2021-07-22 18:11+0000)
Liquibase Version: 4.4.2
Liquibase Community 4.4.2 by Datical
1 change sets have not been applied to LIQUIBASE@jdbc:oracle:thin:@db_server

$ liquibase --defaultsFile=qa --changeLogFile=test.xml update

Starting Liquibase at 09:41:35 (version 4.4.2 #39 built at 2021-07-22 18:11+0000)
Liquibase Version: 4.4.2
Liquibase Community 4.4.2 by Datical
Skipping auto-registration
Unexpected error running Liquibase: ORA-00955: name is already used by an existing object

@molivasdat
Copy link
Contributor

Hi @kdenis4 Thanks so much for the example. We just tried that in our system and cannot reproduce what you are seeing. Can you share the items that are being set by the qa file being used, you don't necessarily have to provide the values they are setting because those are your customer/environment specific values. Or/and in addition set the loglevel=FINE

@kdenis4
Copy link
Author

kdenis4 commented Jul 26, 2021

hi @molivasdat. Thanks for the idea. Seems this item has introduced the issue: liquibaseSchemaName

@kdenis4
Copy link
Author

kdenis4 commented Jul 26, 2021

@molivasdat Seems 4.4.2 just keep ignoring liquibase-schema-name (liquibaseSchemaName) parameter. It registers all changes under the connection (LIQUIBASE in my case) user.

@molivasdat molivasdat changed the title 4.4.2 CLI considers the applied changes as not applied. 4.4.2 CLI considers the applied changes as not applied when using liquibaseSchemaName. Jul 26, 2021
@molivasdat
Copy link
Contributor

Thanks for the feedback @kdenis4 . We will add this to our list of issues to process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants