I made a typo in createTable definition. I used columns instead of column as a key for column definition. Liquibase run completed successfully but the column was ignored.
Snippet of the changelog file:
databaseChangeLog:
- changeSet:
id: a
author: spongebob
changes:
...
- createTable:
tableName: storyteller_task
columns:
... many correct column definitions ...
- columns: <---- see the trailing s
constraints:
nullable: false
name: reported_to_oms
type: boolean
defaultValue: false
...
It results into correct run, the column is not created at all though
Steps to Reproduce
Try to align DB with this change set
databaseChangeLog:
- changeSet:
id: a
author: spongebob
changes:
- createTable:
tableName: foo_bar
columns:
- column:
name: id
type: int
- columns:
name: typo_column
type: boolean
Actual Behavior
The SQL statement is created without the typo_column
CREATE TABLE PUBLIC.foo_bar (id INT)
Expected Behavior
I'd expect an error message. Eg. Cannot parse the changeset definition or similar. Ideally before the real DB work.
Additional Context
Maybe the yaml/json/xml changeset files can be validated against some schema...
Hi @pvanek Thanks for finding this issue. Would it be possible to share a few more details where I have highlighted in the comment section of this issue where I have put <need ... here>
Database Vendor & Version: MySQL/H2
Version of Liquibase Used
3.8.3 (org.liquibase:liquibase-core)
Description
I made a typo in createTable definition. I used
columns
instead ofcolumn
as a key for column definition. Liquibase run completed successfully but the column was ignored.Snippet of the changelog file:
It results into correct run, the column is not created at all though
Steps to Reproduce
Try to align DB with this change set
Actual Behavior
The SQL statement is created without the
typo_column
Expected Behavior
I'd expect an error message. Eg.
Cannot parse the changeset definition
or similar. Ideally before the real DB work.Additional Context
Maybe the yaml/json/xml changeset files can be validated against some schema...
Example files