Giter VIP home page Giter VIP logo

Comments (3)

PetterIsberg avatar PetterIsberg commented on June 12, 2024

Adding schemaName="${database.defaultSchemaName}" to the columnExists precondition gets rid of the exception and warning.

from liquibase.

tati-qalified avatar tati-qalified commented on June 12, 2024

Hi @PetterIsberg, thank you for reporting this issue.

I have been able to replicate it with Liquibase versions 4.24.0 and the latest 4.27.0. The warning appears only for MySQL and only for the columnExists precondition.

Having a column starting with an underscore will not generate any warnings. Referencing that column with columnExists will.

If this is done with a table starting with an underscore, the tableExists precondition does't generate any warnings either.

It's a strange bug for sure, but luckily it doesn't block the execution of the changesets. I'll be leaving this ticket open for the community to propose a fix for. Our development team will be available to provide guidance if necessary.

Thank you,
Tatiana

from liquibase.

mpvvliet avatar mpvvliet commented on June 12, 2024

The reason Liquibase acts differently based on the column name starting with a _ is this line of code in ColumnExistsPrecondition. Because of the underscore, the existence of the column is checked using a snapshot instead of a single SQL query.

Changing the regexp to match columns with a starting underscore works with MySQL, but I'm not sure it will work for every database. I think there is probably a safer fix.

from liquibase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.