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

Fix CORE-3078 bug #931

Merged
merged 1 commit into from
Nov 18, 2020
Merged

Fix CORE-3078 bug #931

merged 1 commit into from
Nov 18, 2020

Conversation

dmitriy-volkov
Copy link

@dmitriy-volkov dmitriy-volkov commented Nov 1, 2019

Overview

On PostgreSQL, the dropDefaultValue command only sets the default value to NULL rather than actually dropping it.

Looking at DropDefaultValueGenerator.java, there's no mention of PostgreSQL anywhere, so it ends up using the default "SET DEFAULT NULL".

Steps to Reproduce

  1. Create a table with an int column containing a default value of 10
  2. Run a changeLog with for that column
  3. \d describe that table to see that it now has a default value of null

Expected Results

\d describe that table to see that it has no default value.

Add custom drop default value statement for postgres.
@SteveDonie
Copy link
Contributor

Thanks for the pull request! We are currently very close to shipping version 3.8.1, and will evaluate your contribution for inclusion in the next release.

@dmitriy-volkov
Copy link
Author

@SteveDonie any estimates on when this can be merged?

@datical-jenkins datical-jenkins changed the title Fix CORE-3078 bug LB-42 ⁃ Fix CORE-3078 bug Mar 4, 2020
@datical-jenkins datical-jenkins changed the title LB-42 ⁃ Fix CORE-3078 bug Fix CORE-3078 bug Mar 5, 2020
@ro-rah
Copy link

ro-rah commented Apr 27, 2020

Hi @dmitriy-volkov !

Again thanks for the PR and your time!
We have been streamlining our internal PR acceptance process and can move this to the next state (Conditioning) easier if you include tests (unit and/or integration)

Would you be able to make update corresponding test:
liquibase-core/src/test/java/liquibase/sqlgenerator/core/DropDefaultValueGeneratorTest.java

Thanks,

Ronak

@ro-rah
Copy link

ro-rah commented May 11, 2020

Seems reasonable enough of a PR, will size at a RiskMed instead of RiskLow to allow QA time to add tests if needed.

This was referenced Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DBPostgres IntegrationAny RiskMedium Changes that require more testing or that affect many different code paths. Severity3 ThemeDBObjects TypeBug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants