question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

latest liquibase blocks validation blocks running update on mysql

See original GitHub issue

Environment

Liquibase Version: 4.7.0

Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>

Liquibase Extension(s) & Version:

Database Vendor & Version:

Operating System Type & Version:

Description

A clear and concise description of the issue being addressed. liquibase validator throws exception when running update to create clustered index on primary key using mysql db

Steps To Reproduce

create changeset log setting clustered:true for primary key (like this) - addPrimaryKey: tableName: valueset clustered: true columnNames: code, set_name constraintName: pk_valueset validate: true

List the steps to reproduce the behavior. using latest liquibase/liquibase image start container using changeset log similar to above

Actual Behavior

A clear and concise description of what happens in the software with the version used.

  • Include console output if relevant
  • Include log files if available. chp-liquibase_1 | #################################################### chp-liquibase_1 | ## _ _ _ _ ## chp-liquibase_1 | ## | | () () | ## chp-liquibase_1 | ## | | _ __ _ _ _ | |_ __ _ ___ ___ ## chp-liquibase_1 | ## | | | |/ | | | | | '_ \ / _ / |/ _ \ ## chp-liquibase_1 | ## | || | (| | || | | |) | (| __ \ / ## chp-liquibase_1 | ## _/|_, |_,||./ _,|/_| ## chp-liquibase_1 | ## | | ## chp-liquibase_1 | ## || ## chp-liquibase_1 | ## ## chp-liquibase_1 | ## Get documentation at docs.liquibase.com ## chp-liquibase_1 | ## Get certified courses at learn.liquibase.com ## chp-liquibase_1 | ## Free schema change activity reports at ## chp-liquibase_1 | ## https://hub.liquibase.com ## chp-liquibase_1 | ## ## chp-liquibase_1 | #################################################### chp-liquibase_1 | Starting Liquibase at 20:32:12 (version 4.7.0 #1140 built at 2022-01-07 19:26+0000) chp-liquibase_1 | Liquibase Version: 4.7.0 chp-liquibase_1 | Liquibase Community 4.7.0 by Liquibase chp-liquibase_1 | chp-liquibase_1 | Unexpected error running Liquibase: Validation Failed: chp-liquibase_1 | 1 changes have validation failures chp-liquibase_1 | Cannot specify clustered=true on mysql,

Expected/Desired Behavior

A clear and concise description of what happens in the software after a fix is created and merged.

Screenshots (if appropriate)

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kmoore-regencecommented, Jan 14, 2022

using 4.4.3 of liquibase allowed the update to complete so its most likely a bug in the validation logic

0reactions
MalloD12commented, Aug 17, 2022

I cannot reproduce this issue:

Liquibase Version: 4.15.0

Liquibase Integration & Version: CLI

Liquibase Extension(s) & Version:

Database Vendor & Version: MySQL 8.0.26

Operating System Type & Version: Mac OS 12.1

I have executed update command with below changelog:

databaseChangeLog:
  - changeSet:
      id: 1
      author: dmallorga
      changes:
        - createTable:
            tableName: person
            columns:
              - column:
                  name: id
                  type: int
                  autoIncrement: true
                  constraints:
                    primaryKey: true
                    nullable: false
                    clustered: true
              - column:
                  name: firstname
                  type: varchar(50)
              - column:
                  name: lastname
                  type: varchar(50)
                  constraints:
                    nullable: false
              - column:
                  name: state
                  type: char(2)

and it was executed successfully: Screen Shot 2022-08-17 at 4 25 45 PM Screen Shot 2022-08-17 at 4 28 02 PM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release Notes | Liquibase Docs
Liquibase 4.18.0 – December 6, 2022 · Breaking Changes · Notable Changes · Security, Driver and other updates · Fixes · New Contributors...
Read more >
database - Liquibase lock - reasons? - Stack Overflow
Sometimes if the update application is abruptly stopped, then the lock remains stuck. Then running. UPDATE DATABASECHANGELOGLOCK SET LOCKED=0, ...
Read more >
How To Implement Automatic Database Updates By ...
Learn how to integrate Liquibase into your Java SE, Spring or Java EE application so that it automatically updates the database at startup....
Read more >
Tutorial for Beginners | Running Your First Update - Liquibase
Open a command-line or Terminal app. · Navigate to your ...examples/sql directory or ...examples/xml directory . · In your command prompt run liquibase...
Read more >
Deploy, track, and roll back RDS database code changes ...
Step 3: Launch the EC2 instance to host Jenkins and Liquibase. For the build environment, I will launch an Amazon EC2 instance running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found