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

CORE-3594 Automatic dropping of default values on MS SQL #1003

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

pom75
Copy link

@pom75 pom75 commented Feb 24, 2020

https://liquibase.jira.com/projects/CORE/issues/CORE-3594

Error Message During Column Drop with Default Value

{CODE}
RROR Reason: liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE TEST DROP COLUMN COL2: The object 'DF_GENERIC_ENTITY_COL2' is dependent on column 'COL2'.
{CODE}

Steps to Reproduce

  1. Create a changelog with the following changes:
    {CODE}

<changeSet id="C2" labels="dropColumnWithDefaultValue>


{CODE}
2. Execute a Liquibase update to deploy C1 to a SQL Server database:
{CODE}
liquibase --changeLogFile=mychangelog.xml --labels=columnWithDefaultValue update
{CODE}
3. Execute a second Liquibase update to deploy C2:
{CODE}
liquibase --changeLogFile=mychangelog.xml --labels=dropColumnWithDefaultValue update
{CODE}

Expected Results

There is no error dropping the column.

Actual Results

The error identified earlier in the description is output during dropColumn execution.

Manual Test Criteria

  • Validate the bug is reproducible following the Repro steps.
  • Do a desk check with the developer.
  • Verify the fix works on your machine.

Automated Test Criteria

  • Write an MSSQL regression test
    • Name: Drop column does not fail for a column with a default value.
    • Description: Ticket number.

┆Issue is synchronized with this Jira Bug by Unito
┆fixVersions: Community 4.x,Liquibase 4.3.0

@SteveDonie
Copy link
Contributor

Thanks for the pull request and for including tests!

Here’s what happens next:

A member of the Liquibase team will take a look at your contribution and may suggest changes, additional tests, or provide other feedback. The PR will be prioritized according to our internal development and testing capacity.
We’ll let you know when it’s ready to move to the next step or if any changes are needed.

Thanks again!

@datical-jenkins datical-jenkins changed the title CORE-3594 Automatic dropping of default values on MS SQL LB-11 ⁃ CORE-3594 Automatic dropping of default values on MS SQL Mar 4, 2020
@datical-jenkins datical-jenkins changed the title LB-11 ⁃ CORE-3594 Automatic dropping of default values on MS SQL CORE-3594 Automatic dropping of default values on MS SQL Mar 5, 2020
@SteveDonie SteveDonie added the RiskMedium Changes that require more testing or that affect many different code paths. label Mar 26, 2020
@ro-rah
Copy link

ro-rah commented Apr 10, 2020

closes #CORE-3594

@ro-rah
Copy link

ro-rah commented Apr 10, 2020

I see this was already in the backlog, so I am going to push this PR along internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DBMSSQLServer IntegrationAny RiskMedium Changes that require more testing or that affect many different code paths. ThemeDBObjects TypeBug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants