Hello,
I have a few ideas (improvements) [my Liquibase version is 4.6.1]
1.Improve working of “context” with "includeAll"
A)
<includeAll path="database\tables" context="TEST_CONTEXT" />
- inside *\tables* folder I have SQL changelog:
--changeset rgrzegorczyk:CREATE_TAB
CREATE TABLE TEST (id number);
Actual behavior:
- after running “Liquibase update”, my newly inserted row is having a column
DATABASECHANGELOG.CONTEXTS = NULL
Expected behavior:
DATABASECHANGELOG.CONTEXTS = “TEST_CONTEXT”
Context in parent changelog should be default for changesets without individually defined contexts.
B)
<includeAll path="database\tables" context="TEST_CONTEXT" />
- inside /tables/ folder I have SQL changelog:
--changeset rgrzegorczyk:CREATE_TAB context:MY_CONTEXT
CREATE TABLE TEST (id number);
Actual behavior:
- after running “Liquibase update”, my newly inserted row is having column
DATABASECHANGELOG.CONTEXTS = ‘TEST_CONTEXT AND MY_CONTEXT’
Expected behavior:
If changeset has its own context defined then it’s the only one that should be used. So the value should be:
DATABASECHANGELOG.CONTEXTS = ‘MY_CONTEXT’
2. Enable “labels” working with "includeAll"
Behavior should be analogical to those described in 1.A and 1.B
3. Normalizing “context” and "contexts"
E.g. in XML changesets or SQL changesets valid tag is “context” but the column in DATABASECHANGELOG table is called contextS
It made me crazy many times when misspelled “context” with “contexts” when writing changesets
Could you make both “context” and “contexts” valid syntax when writing changesets?
4. Liquibase checks
As I understand, the main idea is: to check if every check passed. If not then show it in a report, if yes then remove it from the report.
What about creating a syntax, sth like
<ValidCheckSum>ANY</validCheckSum>"?
I would like to mark some changesets or whole changelogs and tell Liquibase:
Don’t run ANY or SOME (listed) checks with this changeset/ changelogs?
5. Normalizing LABELS and do not LOWER() my values in labels
When I define label in changeset like this:
label:TEST or labels="TEST"
then the final insert into DATABSECHANGELOGTABLE always go with LOWER(), so the final value in column LABELS is “test” with lower letters.
It would be great to make it case-sensitive, and insert exact value I provided in my changeset.