Quantcast
Channel: Liquibase Forums
Viewing all 2993 articles
Browse latest View live

executeCommand - Oracle 'sqlplus'

$
0
0
Is there a way to use executeCommand against sqlplus
I want to run a script that has some commands that  liquibase does not support(like SPOOL) using executeCommand
If so, how should my changeSet look like, and where should the scripts be placed.  

Functions, Stored Proc, and the Like

$
0
0
Looking at the history of database stored procedures and functions and the like is notoriously difficult.  It occurs to me that I could put all our stored procedures and functions in git and just reference them using the sqlFile attribute in a new changeSet whenever a new change would need to be applied.  However, from what I've read, it seems as if any changeSet that reference a sqlFile that has been changed, would then have a different md5 and liquibase would then try to apply it.

We are using the best practice approach where we have one master changelog file per schema and from there we reference a new changelog file per new release.

```
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2017.Q3.R1.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2017.Q3.R2.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2017.Q4.R1.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2018.Q1.R1.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2018.Q2.R1.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2018.Q3.R1.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2018.Q4.R1.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2019.Q1.R1.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2019.Q1.R2.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2019.Q1.R3.xml"/>
    <include relativeToChangelogFile="true" file="catalog.db.changelog-2019.Q2.R1.xml"/>
</databaseChangeLog>
```

It occurs to me that maybe the right approach for having an individual sqlFile per function/stored proc would be to have a single include that would look something like this:

```
    <include relativeToChangelogFile="true" file="catalog.db.changelog-functions.xml"/>
```

And in there, I'd have a bunch of changeSets that reference the individual sqlFiles and then any time one of the referenced sqlFiles changes, the changeSet would be reapplied.  Is that how it would work?

```
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog

    <changeSet id="function1" author="vrodrigu">
        <sqlFile path="path/to/function1.sql"/>
    </changeSet>

    <changeSet id="function2" author="vrodrigu">
        <sqlFile path="path/to/function2.sql"/>
    </changeSet>

    <changeSet id="function3" author="vrodrigu">
        <sqlFile path="path/to/function3.sql"/>
    </changeSet>

</databaseChangeLog>
```

Unable to (view not found)

$
0
0
When I try to delete a view I get the following message:
  1. SEVERE 3/23/19 11:12 PM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-existing-accountsview::sb: Change Set db-changelog/db-changelog-1.0.0.xml::drop-existing-accountsview::sb failed.  Error: Table/View 'APP.ACCOUNTS_VIEW' does not exist. [Failed SQL: DROP VIEW APP.accounts_view]
As far as I can see, the view name ("accounts_view") is identical to the name of the view I'm trying to drop and recreate.  Any idea what's wrong?

The database that outputs the error, is derby. I'm using the same changelog file(s) for derby in tests and PostgreSQL in production.

This is the changelog file.  The view is created in the big, monolithic <changeSet> at the start.  The <dropView> is attempted from a small <changeSet> following it.
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">

  3.     <!-- Copyright 2016-2019 Steinar Bang                                                -->
  4.     <!--                                                                                 -->
  5.     <!-- Licensed under the Apache License, Version 2.0 (the "License");                 -->
  6.     <!-- you may not use this file except in compliance with the License.                -->
  7.     <!-- You may obtain a copy of the License at                                         -->
  8.     <!--   http://www.apache.org/licenses/LICENSE-2.0                                    -->
  9.     <!-- Unless required by applicable law or agreed to in writing,                      -->
  10.     <!-- software distributed under the License is distributed on an "AS IS" BASIS,      -->
  11.     <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.        -->
  12.     <!-- See the License for the specific language governing permissions and limitations -->
  13.     <!-- under the License.                                                              -->

  14.     <changeSet author="sb" id="ukelonn-1.0.0">

  15.         <createTable tableName="users">
  16.             <column autoIncrement="true" name="user_id" type="INTEGER">
  17.                 <constraints primaryKey="true" primaryKeyName="SQL170518210719000"/>
  18.             </column>
  19.             <column name="username" type="VARCHAR(64)">
  20.                 <constraints nullable="false"/>
  21.             </column>
  22.             <column name="password" type="VARCHAR(64)">
  23.                 <constraints nullable="false"/>
  24.             </column>
  25.             <column name="salt" type="VARCHAR(64)">
  26.                 <constraints nullable="false"/>
  27.             </column>
  28.             <column name="email" type="VARCHAR(64)">
  29.                 <constraints nullable="false"/>
  30.             </column>
  31.             <column name="first_name" type="VARCHAR(256)">
  32.                 <constraints nullable="false"/>
  33.             </column>
  34.             <column name="last_name" type="VARCHAR(256)">
  35.                 <constraints nullable="false"/>
  36.             </column>
  37.         </createTable>

  38.         <createTable tableName="transaction_types">
  39.             <column autoIncrement="true" name="transaction_type_id" type="INTEGER">
  40.                 <constraints primaryKey="true" primaryKeyName="SQL170518210719080"/>
  41.             </column>
  42.             <column name="transaction_type_name" type="VARCHAR(256)">
  43.                 <constraints nullable="false"/>
  44.             </column>
  45.             <column name="transaction_amount" type="DOUBLE"/>
  46.             <column defaultValueBoolean="false" name="transaction_is_work" type="BOOLEAN">
  47.                 <constraints nullable="false"/>
  48.             </column>
  49.             <column defaultValueBoolean="false" name="transaction_is_wage_payment" type="BOOLEAN">
  50.                 <constraints nullable="false"/>
  51.             </column>
  52.         </createTable>

  53.         <createTable tableName="administrators">
  54.             <column autoIncrement="true" name="administrator_id" type="INTEGER">
  55.                 <constraints primaryKey="true" primaryKeyName="SQL170518210719121"/>
  56.             </column>
  57.             <column name="user_id" type="INTEGER">
  58.                 <constraints nullable="false"/>
  59.             </column>
  60.         </createTable>

  61.         <createIndex indexName="SQL170518210719120" tableName="administrators">
  62.             <column name="user_id"/>
  63.         </createIndex>

  64.         <addForeignKeyConstraint baseColumnNames="user_id" baseTableName="administrators" constraintName="SQL170518210719120" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="user_id" referencedTableName="users"/>

  65.         <createTable tableName="accounts">
  66.             <column autoIncrement="true" name="account_id" type="INTEGER">
  67.                 <constraints primaryKey="true" primaryKeyName="SQL170518210719041"/>
  68.             </column>
  69.             <column name="user_id" type="INTEGER"/>
  70.         </createTable>

  71.         <createIndex indexName="SQL170518210719040" tableName="accounts">
  72.             <column name="user_id"/>
  73.         </createIndex>

  74.         <addForeignKeyConstraint baseColumnNames="user_id" baseTableName="accounts" constraintName="SQL170518210719040" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="user_id" referencedTableName="users"/>

  75.         <createTable tableName="transactions">
  76.             <column autoIncrement="true" name="transaction_id" type="INTEGER">
  77.                 <constraints primaryKey="true" primaryKeyName="SQL170518210719092"/>
  78.             </column>
  79.             <column name="account_id" type="INTEGER">
  80.                 <constraints nullable="false"/>
  81.             </column>
  82.             <column name="transaction_type_id" type="INTEGER">
  83.                 <constraints nullable="false"/>
  84.             </column>
  85.             <column name="transaction_time" type="TIMESTAMP" defaultValueComputed="CURRENT_TIMESTAMP">
  86.                 <constraints nullable="false"/>
  87.             </column>
  88.             <column name="transaction_amount" type="DOUBLE">
  89.                 <constraints nullable="false"/>
  90.             </column>
  91.         </createTable>

  92.         <createIndex indexName="SQL170518210719090" tableName="transactions">
  93.             <column name="account_id"/>
  94.         </createIndex>

  95.         <createIndex indexName="SQL170518210719091" tableName="transactions">
  96.             <column name="transaction_type_id"/>
  97.         </createIndex>

  98.         <addForeignKeyConstraint baseColumnNames="account_id" baseTableName="transactions" constraintName="SQL170518210719090" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="account_id" referencedTableName="accounts"/>

  99.         <addForeignKeyConstraint baseColumnNames="transaction_type_id" baseTableName="transactions" constraintName="SQL170518210719091" deferrable="false" initiallyDeferred="false" onDelete="NO ACTION" onUpdate="NO ACTION" referencedColumnNames="transaction_type_id" referencedTableName="transaction_types"/>

  100.         <createView fullDefinition="false" viewName="accounts_view">select accounts.account_id, users.user_id, username, first_name, last_name, SUM(transaction_amount) as balance&#13;
  101.         from users&#13;
  102.         join accounts on accounts.user_id=users.user_id&#13;
  103.         join transactions on transactions.account_id=accounts.account_id&#13;
  104.         group by accounts.account_id, users.user_id, username, first_name, last_name</createView>

  105.         <createView fullDefinition="false" viewName="administrators_view">select administrators.administrator_id, users.user_id, username, first_name, last_name&#13;
  106.         from users&#13;
  107.         join administrators on administrators.user_id=users.user_id&#13;
  108.         group by administrators.administrator_id, users.user_id, username, first_name, last_name</createView>

  109.         <createView fullDefinition="false" viewName="wage_payments_view">select accounts.account_id, users.user_id, username, transaction_time, transaction_type_name, ABS(transactions.transaction_amount) as transaction_amount&#13;
  110.         from users&#13;
  111.         join accounts on accounts.user_id=users.user_id&#13;
  112.         join transactions on transactions.account_id=accounts.account_id&#13;
  113.         join transaction_types on transaction_types.transaction_type_id=transactions.transaction_type_id and transaction_is_wage_payment&#13;
  114.         order by transaction_time desc</createView>

  115.         <createView fullDefinition="false" viewName="work_done_view">select accounts.account_id, users.user_id, username, transaction_time, transaction_type_name, transactions.transaction_amount&#13;
  116.         from users&#13;
  117.         join accounts on accounts.user_id=users.user_id&#13;
  118.         join transactions on transactions.account_id=accounts.account_id&#13;
  119.         join transaction_types on transaction_types.transaction_type_id=transactions.transaction_type_id and transaction_is_work&#13;
  120.         order by transaction_time desc</createView>

  121.     </changeSet>

  122.     <changeSet author="sb" id="add-username-to-account-table">
  123.         <addColumn tableName="accounts">
  124.             <column name="username" type="VARCHAR(64)" />
  125.         </addColumn>
  126.     </changeSet>

  127.     <changeSet author="sb" id="insert-usernames-in-accounts-table">
  128.         <sql>update accounts set username=(select u.username from users u join accounts a on u.user_id=a.user_id)</sql>
  129.     </changeSet>

  130.     <changeSet author="sb" id="give-users-username-an-uniqueness-constraint">
  131.         <addUniqueConstraint tableName="users" columnNames="username" />
  132.     </changeSet>

  133.     <changeSet author="sb" id="add-foreign-key-constraint-from-accounts-to-users">
  134.         <addForeignKeyConstraint baseTableName="accounts" baseColumnNames="username" constraintName="fk_account_username" referencedColumnNames="username" referencedTableName="users" />
  135.     </changeSet>

  136.     <changeSet author="sb" id="drop-old-foreign-key-constraint-from-accounts-to-users">
  137.         <dropForeignKeyConstraint baseTableName="accounts" constraintName="SQL170518210719040" />
  138.     </changeSet>

  139.     <changeSet author="sb" id="drop-column-userid-from-accounts">
  140.         <dropColumn tableName="accounts" columnName="user_id" />
  141.     </changeSet>

  142.     <changeSet author="sb" id="drop-existing-accountsview">
  143.         <dropView viewName="accounts_view" />
  144.     </changeSet>

  145.     <changeSet author="sb" id="create-new-accountsview">
  146.         <createView fullDefinition="false" viewName="accounts_view">
  147.             select accounts.account_id, users.user_id, username, first_name, last_name, SUM(transaction_amount) as balance
  148.             from users
  149.             join accounts on accounts.username=users.username
  150.             join transactions on transactions.account_id=accounts.account_id
  151.             group by accounts.account_id, users.user_id, username, first_name, last_name
  152.         </createView>
  153.     </changeSet>

  154. </databaseChangeLog>

State of liquibase cassandra

Re : State of liquibase cassandra

$
0
0
Hi, Aleks!

Liquibase and Datical are committed to Cassandra support. We think it's been too long since we've seen an update to this.

That's why we've partnered with DataStax to help with this. All of us are working on delivering this. But, we don't have a date for delivery yet.

What can help us is knowing the version of Cassandra you are working with. 

Thanks!

Robert @ Datical

Re : Unable to (view not found)

$
0
0
For some reason, this problem went away: I ran into a lot of issues when trying to run the new changesets on PostgreSQL and after correcting all of the issues I was able to add the offending <dropView> without any issues.
What I did
  1. The error message came when I was trying to drop the userid column. Liquibase failed, because the userid colum was used by something else
  2. I had already dropped the fk constraints from the column to userid in the users table
  3. I dropped the index on the userid colum, then I got complaints from two other views using the column
  4. I dropped the views (I was no longer using them anyway)
    1.     <changeSet author="sb" id="drop-views-linking-to-account-user_id">
    2.         <dropView viewName="wage_payments_view" />
    3.         <dropView viewName="work_done_view" />
    4.     </changeSet>
  5. I now got an error message saying that the accounts_view was still using the column
  6. I put in the <dropView> that had failed earlier, and expected it to fail, except it didn't
    1.     <changeSet author="sb" id="drop-accounts-view">
    2.         <dropView viewName="accounts_view" />
    3.     </changeSet>
  7. Now I could run the changelog on PostgreSQL without errors (including dropping the userid column from the accounts table), so I tried running it on derby, and this time removing the view didn't fail
  8. So I put in a new and updated view without the userid column and this worked fine
    1.     <changeSet author="sb" id="create-new-accountsview">
    2.         <createView fullDefinition="false" viewName="accounts_view">
    3.             select accounts.account_id, accounts.username, first_name, last_name, SUM(transaction_amount) as balance
    4.             from users
    5.             join accounts on accounts.username=users.username
    6.             join transactions on transactions.account_id=accounts.account_id
    7.             group by accounts.account_id, accounts.username, first_name, last_name
    8.         </createView>
    9.     </changeSet>
  9. Now I'm trying to remove the view completely and I'm again told the view doesn't exist
    1.     <changeSet author="sb" id="drop-accounts-view-for-good">
    2.         <dropView viewName="accounts_view" />
    3.     </changeSet>
  10. The accounts_view, with the new username column in the accounts table, obviously exists when code is running, if not, the code would have failed at an early stage
  11. I thought it might have something to do with transactions used by the liquibase setup (when running in derby in memory, in test situations, I always set the database up from scratch) so I tried running the <dropView> from a separate <databaseChangelog> in a different file, but I still got the accounts_view not found
  12. I added a conditional to the <changeSet> removing the accounts_view
    1.     <changeSet author="sb" id="drop-accounts-view-for-good">
    2.         <preConditions onFail="CONTINUE" >
    3.             <not>
    4.                 <viewExists viewName="accounts_view" />
    5.             </not>
    6.         </preConditions>

    7.         <dropView viewName="accounts_view" />
    8.     </changeSet>
  13. Now I didn't get any errors when running the <changeLog> in derby, but the count of sucessful changeSets stayed the same
  14. I tried running the changelog in PostgreSQL again and here also it didn't fail, but I found the following in the log
    1. 2019-03-29T23:48:39,634 | INFO  | features-1-thread-1 | liquibase                        | 134 - org.liquibase.core - 3.5.3 | db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-accounts-view-for-good::sb: Continuing past: db-changelog/db-changelog-1.0.0.xml::drop-accounts-view-for-good::sb despite precondition failure due to onFail='CONTINUE': 
    2.           db-changelog/db-changelog-1.0.0.xml : Not precondition failed
  15. I thought it might have been the other blockers for removing userid that masked <dropView> of accounts the first time I  tried, but now I don't know what would be the candidates for such a masking? (I don't know why the index on the userid column and the other two views would mask accounts_view in the first place)
Ideas?

Re : Unable to (view not found)

$
0
0
Hm... when I look at the log output from the failing unit test it looks like <dropView> runs without error.  Maybe I've been fooling myself (wouldn't be the first time...):
  1. INFO 3/30/19 11:26 AM: liquibase: Successfully acquired change log lock
  2. INFO 3/30/19 11:26 AM: liquibase: Creating database history table with name: APP.DATABASECHANGELOG
  3. INFO 3/30/19 11:26 AM: liquibase: Reading from APP.DATABASECHANGELOG
  4. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Table users created
  5. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Table transaction_types created
  6. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Table administrators created
  7. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Index SQL170518210719120 created
  8. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Foreign key constraint added to administrators (user_id)
  9. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Table accounts created
  10. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Index SQL170518210719040 created
  11. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Foreign key constraint added to accounts (user_id)
  12. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Table transactions created
  13. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Index SQL170518210719090 created
  14. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Index SQL170518210719091 created
  15. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Foreign key constraint added to transactions (account_id)
  16. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: Foreign key constraint added to transactions (transaction_type_id)
  17. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: View accounts_view created
  18. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: View administrators_view created
  19. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: View wage_payments_view created
  20. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: View work_done_view created
  21. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::ukelonn-1.0.0::sb ran successfully in 76ms
  22. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-to-account-table::sb: Columns username(VARCHAR(64)) added to accounts
  23. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-to-account-table::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::add-username-to-account-table::sb ran successfully in 36ms
  24. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-index-to-accounts-table::sb: Index accounts-username-index created
  25. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-index-to-accounts-table::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::add-username-index-to-accounts-table::sb ran successfully in 3ms
  26. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::insert-usernames-in-accounts-table::sb: Custom SQL executed
  27. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::insert-usernames-in-accounts-table::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::insert-usernames-in-accounts-table::sb ran successfully in 5ms
  28. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::give-users-username-an-uniqueness-constraint::sb: Unique constraint added to users(username)
  29. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::give-users-username-an-uniqueness-constraint::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::give-users-username-an-uniqueness-constraint::sb ran successfully in 7ms
  30. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-foreign-key-constraint-from-accounts-to-users::sb: Foreign key constraint added to accounts (username)
  31. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-foreign-key-constraint-from-accounts-to-users::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::add-foreign-key-constraint-from-accounts-to-users::sb ran successfully in 7ms
  32. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-foreign-key-constraint-from-accounts-to-users::sb: Foreign key SQL170518210719040 dropped
  33. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-foreign-key-constraint-from-accounts-to-users::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-old-foreign-key-constraint-from-accounts-to-users::sb ran successfully in 7ms
  34. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-index-from-accounts-userid-to-users::sb: Index SQL170518210719040 dropped from table accounts
  35. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-index-from-accounts-userid-to-users::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-old-index-from-accounts-userid-to-users::sb ran successfully in 3ms
  36. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-views-linking-to-account-user_id::sb: View wage_payments_view dropped
  37. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-views-linking-to-account-user_id::sb: View work_done_view dropped
  38. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-views-linking-to-account-user_id::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-views-linking-to-account-user_id::sb ran successfully in 6ms
  39. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-accounts-view::sb: View accounts_view dropped
  40. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-accounts-view::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-accounts-view::sb ran successfully in 2ms
  41. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-column-userid-from-accounts::sb: Column accounts.user_id dropped
  42. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-column-userid-from-accounts::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-column-userid-from-accounts::sb ran successfully in 6ms
  43. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::create-new-accountsview::sb: View accounts_view created
  44. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::create-new-accountsview::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::create-new-accountsview::sb ran successfully in 5ms
  45. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-column-to-administrators-table::sb: Columns username(VARCHAR(64)) added to administrators
  46. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-column-to-administrators-table::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::add-username-column-to-administrators-table::sb ran successfully in 3ms
  47. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-index-to-administrators-table::sb: Index administrators-username-index created
  48. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-username-index-to-administrators-table::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::add-username-index-to-administrators-table::sb ran successfully in 2ms
  49. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-foreign-key-constraint-from-administrators-to-users::sb: Foreign key constraint added to administrators (username)
  50. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::add-foreign-key-constraint-from-administrators-to-users::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::add-foreign-key-constraint-from-administrators-to-users::sb ran successfully in 6ms
  51. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::insert-usernames-in-administrators-table::sb: Custom SQL executed
  52. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::insert-usernames-in-administrators-table::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::insert-usernames-in-administrators-table::sb ran successfully in 7ms
  53. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-administrators-view::sb: View administrators_view dropped
  54. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-administrators-view::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-administrators-view::sb ran successfully in 1ms
  55. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-foreign-key-constraint-from-administrators-to-users::sb: Foreign key SQL170518210719120 dropped
  56. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-foreign-key-constraint-from-administrators-to-users::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-old-foreign-key-constraint-from-administrators-to-users::sb ran successfully in 2ms
  57. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-index-from-administrators-userid-to-users::sb: Index SQL170518210719120 dropped from table administrators
  58. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-old-index-from-administrators-userid-to-users::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-old-index-from-administrators-userid-to-users::sb ran successfully in 2ms
  59. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-column-userid-from-administrators::sb: Column administrators.user_id dropped
  60. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-column-userid-from-administrators::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-column-userid-from-administrators::sb ran successfully in 4ms
  61. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::create-new-administratorsview::sb: View administrators_view created
  62. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::create-new-administratorsview::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::create-new-administratorsview::sb ran successfully in 4ms
  63. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-accounts-view-for-good::sb: View accounts_view dropped
  64. INFO 3/30/19 11:26 AM: liquibase: db-changelog/db-changelog-1.0.0.xml: db-changelog/db-changelog-1.0.0.xml::drop-accounts-view-for-good::sb: ChangeSet db-changelog/db-changelog-1.0.0.xml::drop-accounts-view-for-good::sb ran successfully in 3ms
  65. INFO 3/30/19 11:26 AM: liquibase: Successfully released change log lock
  66. INFO 3/30/19 11:26 AM: liquibase: Successfully acquired change log lock
  67. INFO 3/30/19 11:26 AM: liquibase: Reading from APP.DATABASECHANGELOG
  68. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_transaction_types.sql::example_transaction_types::sb: Custom SQL executed
  69. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_transaction_types.sql::example_transaction_types::sb: ChangeSet sql/data/example_transaction_types.sql::example_transaction_types::sb ran successfully in 16ms
  70. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_users.sql::example_users::sb: Custom SQL executed
  71. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_users.sql::example_users::sb: ChangeSet sql/data/example_users.sql::example_users::sb ran successfully in 11ms
  72. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_administrators.sql::example_administrators::sb: Custom SQL executed
  73. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_administrators.sql::example_administrators::sb: ChangeSet sql/data/example_administrators.sql::example_administrators::sb ran successfully in 6ms
  74. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_accounts.sql::example_accounts::sb: Custom SQL executed
  75. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_accounts.sql::example_accounts::sb: ChangeSet sql/data/example_accounts.sql::example_accounts::sb ran successfully in 9ms
  76. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_transactions.sql::example_transactions::sb: Custom SQL executed
  77. INFO 3/30/19 11:26 AM: liquibase: sql/data/db-changelog.xml: sql/data/example_transactions.sql::example_transactions::sb: ChangeSet sql/data/example_transactions.sql::example_transactions::sb ran successfully in 84ms
  78. INFO 3/30/19 11:26 AM: liquibase: Successfully released change log lock

Re : Unable to (view not found)

$
0
0
I was indeed fooling myself, both the first time and now this time.  The failing unit test had the following code in it:
  1.     // Test the database by making a query using a view
  2.         try(Connection connection = provider.getConnection()) {
  3.             PreparedStatement statement = connection.prepareStatement("select * from accounts_view where username=?");
  4.             statement.setString(1, "jad");
  5.             ResultSet onAccount = statement.executeQuery();
  6.             assertNotNull(onAccount);
  7.             assertTrue(onAccount.next());
  8.             int account_id = onAccount.getInt("account_id");
  9.             String username = onAccount.getString("username");
  10.             String first_name = onAccount.getString("first_name");
  11.             String last_name = onAccount.getString("last_name");
  12.             assertEquals(4, account_id);
  13.             assertEquals("jad", username);
  14.             assertEquals("Jane", first_name);
  15.             assertEquals("Doe", last_name);
  16.         }
Sorry about the noise!

Running a Liquibase change log from within a change set?

$
0
0
Here's the scenario.

There are multiple microservices, each runs using Spring Boot. Data is persisted in a common database, with each microservice having it's own schema. Over time as the tables for a microservice evolve, Liquibase is used for maintenance. In a brand new install of the product, Liquibase would create new tables as the service starts.

For a variety of reasons we need to combine microservices. Let's say service P (primary) and service S (secondary) are to be combined with all the tables under ONE schema (P's in this case). One of the requirements is that the changesets in the combined microservice should be able to handle a back-level migration. Let's say that both services are now at version 4 and a customer at version 2 wants to "upgrade". In the old model of non-combined services, when the version 4 of services P and S run for the first time both services schemas would be upgraded to V 4 (assuming there were changes in V3 and V4).

The combines service needs to handle the same upgrade scenario. I believe I can handle this if I can find a way to upgrade the secondary schemas from a changelog. Upgrading the Primary is what normally would happen and it not the issue. Typically, a change log runs "driven" by the corresponding databaseChangeLog table. I say "driven" because the entry for a changeset in the table determines whether the changeset needs to be executed in a succeeding invocation of the service. The change log for the new combined service will need to be enhanced to upgrade any existing schema for S before the tables are copied over using a custom sql task. I see the existing schema upgrade as a different custom task which sets up a new Liquibase environment and runs a change log for S against its schema. The code below is from the upgrade custom task's execute() method and in it "originalSchema" is the schema of S which needs to be upgraded.

public void execute(Database database) throws CustomChangeException {
    LOGGER.debug("Updating Schema " + originalSchema);
    confirmationMessage = ""; // if there's an exception it'll visible in the log.
    validateSettings();

    JdbcConnection dbConn = (JdbcConnection) database.getConnection();

    try {
        Database db = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(dbConn);

        String savedDefaultSchema = database.getDefaultSchemaName();
        String savedLiquibaseSchema = database.getLiquibaseSchemaName();

        database.setDefaultSchemaName(originalSchema);

        ChangeLogHistoryServiceFactory savedCLHSFactory = ChangeLogHistoryServiceFactory.getInstance();
        ChangeLogHistoryServiceFactory.reset();

        Liquibase liquibase = new Liquibase(changeLogPath, new ClassLoaderResourceAccessor(), database);
        liquibase.update(new Contexts(), new LabelExpression());

        ChangeLogHistoryServiceFactory.setInstance(savedCLHSFactory);

        database.setDefaultSchemaName(savedDefaultSchema);

        confirmationMessage = String.format("UpgradeSchema has successfully run on schema %s using change log %s.", originalSchema, changeLogPath);
    }
    catch (DatabaseException de) {
        throw new CustomChangeException(de);
    }
    catch (LiquibaseException le) {
        throw new CustomChangeException(le);
    }
}

I discovered if I did not "reset" the ChangeLogHistoryServiceFactory it would use the cached changelog table of the combined service which was being used to "drive" the changelog. A "services" map is maintained by ChangeLogHistoryServiceFactory and since the "DataBase", which is the key to the map, does not change the same StandardChangeLogHistoryService is returned when in the new environment. Doing a reset on the ChangeLogHistoryServiceFactory gets around it.

Being a relative newbie to Liquibase (I've written change sets using the "builtin" Change objects, but never attempted a custom one), I thought I'd ask the experts for feedback as to whether the above conforms to "best practices" of running a Liquibase change log to affect a different schema from within a change set.

I do recognize the above is not thread safe, but I'd like to keep that out of the discussion unless relevant.

Thanks for taking the time to read this.

Re : State of liquibase cassandra

$
0
0
Hi Robert,

Thanks for the update. It is very helpful.
Our Cassandra version is 3.11.*.
Cheers

URGENT: Moving views and functions to files for better version control

$
0
0
Hey guys!  I'm moving all of our view and functions to files for better version control with git.  I'm using sqlFile obviously.

However, I'm struggling with how to handle the granting of privileges.  After some iterations, I decided to have the granting of privileges in a different file than the create/replace for each view/function.  However, the problem is that some roles don't exist in all environments, and when that happens, the whole changeSet appears to be rolledback.

For example, if I have the following....

REVOKE ALL ON FUNCTION some_function() FROM PUBLIC;
REVOKE ALL ON FUNCTION some_function() FROM schema_owner_role;
GRANT ALL ON FUNCTION some_function() TO schema_owner_role;
GRANT ALL ON FUNCTION some_function() TO another_good_role;
GRANT ALL ON FUNCTION some_function() TO role_that_does_not_exist;
GRANT ALL ON FUNCTION some_function() TO yet_another_good_role;

Even if I have failOnError="false" and runInTransaction="false", the changeset does not appear as having been run in the databasechangelog table and when I look at the function, none of the grants appear to have worked. Is there any way to have liquibase ignore any errors and execute every sql statement through the end of a changeSet/sqlFile?

The alternative is to put every single statement in it's own changeSet, each with failOnError="false", but then I'm going to have HUNDREDS, if not THOUSANDS of changeSets.

Any help/insight/suggestions would be greatly appreciated.  Thanks!

URGENT: failOnError="false" and runAlways="false" don't seem to have the desired intent.

$
0
0
With failOnError="false" and runAlways="false" I'd expect to have an entry in the databasechangelog regardless if there was an error or not.  This is not the case.  Therefore, I assume that the changeSet will keep being executed even with runAlways="false".  That seems contradictory.  Thoughts?

Re : URGENT: failOnError="false" and runAlways="false" don't seem to have the desired intent.

$
0
0
FYI, I can confirm that with failOnError="false" and runAlways="false", no record of the changeset is made in the databasechangelog and the changeset continues to be attempted over and over again.

addColumn rollup for Oracle

$
0
0
Good morning, all.   Long time user of liquibase, first timer here on the forums.

I was helping implement Liquibase in an Oracle shop, and stumbled across the concept that Liquibase's 'addColumn' changeset will generate one ALTER TABLE per column we're adding.   Normally, that's not an issue, but Oracle likes to commit every CREATE/ALTER/DROP, so we ran into the issue of someone writing a change that failed on the 2nd column of an <addColumn> block, thus stranding a new column in no-man's land.  Liquibase didn't recognize it existed (it acted like the changeset didn't go through), and the database was happy continuing to acknowledge we had one brand new column (and Oracle doesn't make it easy to write ADD IF NOT EXISTS ddls)

The best workaround we could come up with was just putting one column per <addColumn> for now, but upon researching I saw that others were trying to rollup multiple columns into one DDL/SQL way in the past:


I wanted to ask if anyone else encountered this.  If there's any hidden liquibase workaround for Oracle yet.   And if there's any big gotchas before I open up an editor and attempt to write a patch for it

Issue related generateChangeLog in MySQL

$
0
0
Hello,

I am trying to create a JSON file from existing DB in MySQL using Liquibase generateChangeLog command. But I am getting runtime error. The following is the command with all switches.  Here are the details:

Liquibase version - 3.6.3
MySQL version 5.7
Command
C:\liquibase-3.6.3-bin>liquibase --changeLogFile=./structure_db2.json --url="jdbc:mysql://localhost:12345" --includeCatalog=true --defaultSchemaName=my_db --username=testuser --password=password --classpath=lib/snakeyaml-1.18.jar --diffTypes="data" --logLevel=debug generateChangeLog

Error trace:
  at liquibase.serializer.core.yaml.YamlSerializer.removeClassTypeMarksFromSerializedJson(YamlSerializer.java:163)
        at liquibase.serializer.core.yaml.YamlSerializer.serialize(YamlSerializer.java:74)
        at liquibase.serializer.core.json.JsonChangeLogSerializer.write(JsonChangeLogSerializer.java:23)
        at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:148)
        at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:87)
        at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:74)
        at liquibase.command.core.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:55)
        at liquibase.command.AbstractCommand.execute(AbstractCommand.java:19)
        ... 4 common frames omitted

I did research on this forum and on the internet and got some clues but nothing has worked so far. 
Here are some of the things I tried:
- Disabled Foreign Keys
- Removed all Foreign Keys
- Removed all Index

I created a small temp table and the above command works fine and creates a JSON for me. That makes me think that Liquibase is not liking something in my DB structure. 

Any help will be appreciated. 

Thanks,
-Atul


Parsing liquibase.properties paramter not used

$
0
0
I will use the liquibase properties file to pass parameters for using in the changelog.
I tried setting the parameter like 
  1. name=value
and
  1. parameter.name=value
But both does not work. Here the logging:
  1. [INFO] Parsing Liquibase Properties File
  2. [INFO]   File: src/main/resources/liquibase.properties
  3. [INFO]   'name' in properties file is not being used by this task.
  4. [INFO]   'parameter.name' in properties file is not being used by this task.
How can I make liquibase reading the paramters out of the properties file?

      Not identical behaviour of mv:liquibase:diff and exceuting diff via maven profile

      $
      0
      0
      Hi, 

      when I execute command line "mvn liquibase:diff", in order to compare my JPA entity model and existing database, a get appropriate diffChangeLog.xml (with two FKs added). But, when I add custom maven "db-diff" profile in which I execute "diff" goal, I get completely different diffChangeLog  - it contains only drop tables statements of my existing database. 
      Am I missing something?

      Best Regards
      Armin

      P.S. pom is attached.

      liquibase.properties:
            changeLogFile=db/changelog/db.changelog-master.xml
      url=jdbc:sqlserver://10.81.1.200:1433;databaseName=psd2
      username=sa
      password=something
      driver=com.microsoft.sqlserver.jdbc.SQLServerDriveroutputChangeLogFile=src/main/resources/liquibase-outputChangeLog.xml
      referenceUrl=hibernate:spring:si.nlb.dbp.psd2.domain?dialect=org.hibernate.dialect.SQLServer2012Dialect
      diffChangeLogFile=liquibase-diff-changeLog.xml


      initial install dump

      $
      0
      0
      Hello,


      I would like to have a command launched at the end of the cycle ony if success :


      mysqldump --no-create-db --no-data "${database}" > "${curdir}/db/structure.sql"


      mysqldump --no-create-db --complete-insert --quote-names "${database}" databasechangelog databasechangeloglock > "${curdir}/db/data.sql"


      the purpose of these files are for initial install off new instance.


      How can i do ?


      Or do i miss something ? ;)

      Where are the supported jdbc drivers listed for the liquibase-maven-plugin?

      $
      0
      0
      I am trying to configure
      1.             <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                        <version>3.0.5</version>
                        <configuration>
                            <changeLogFile>liquibase/local-changelog.yml</changeLogFile>
                            <driver>???</driver>
                            <url>jdbc:postgresql:flow</url>
                            <username>postgres</username>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>update</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
      But the only example on https://www.liquibase.org/documentation/maven/index.html has
      1.           <driver>oracle.jdbc.driver.OracleDriver</driver>
                  <url>jdbc:oracle:thin:@tf-appserv-linux:1521:xe</url>
      How do I know what to use for PostgreSQL? Is it documented anywhere?

      Re : Where are the supported jdbc drivers listed for the liquibase-maven-plugin?

      $
      0
      0
      Okay, after some sleuthing around on the internet, <driver>???</driver> is the Java class name for the JDBC Driver.
      Viewing all 2993 articles
      Browse latest View live


      <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>