I can’t get my comment added to the liquibase change log table. File looks like this. The insert works but the comment is always getting inserted as a blank string. Any ideas on how to add this so it works? I also tried adding comment to the brackets with no luck like (comment:Test this out.)
–liquibase formatted sql
–changeset bob:REL01 (splitStatements:false endDelimiter: –comment TESTING OUT A COMMENT
DROP SCHEMA public;
–rollback CREATE SCHEMA public –rollback AUTHORIZATION postgres;
–rollbackGRANT ALL ON SCHEMA public TO postgres; –rollbackGRANT ALL ON SCHEMA public TO public; –rollbackCOMMENT ON SCHEMA public IS ‘standard public schema’;
Formatted SQL does not support a comment “tag” currently. Your --comment is just seen as a commented SQL line and ignored. The formattedSQL parser could easily be extended/improved to support it if you are interested in looking into it before I get to.
I checked the jira ticket related to this, it seems it has been fixed in liquibase version 3.2.0, however I am not able to add comment via my formatted sql. Any ideas/sugestions?
Here’s how my formatted sql looks like:
–liquibase formatted sql
–changeset ascii:001
–comment CREATE TABLE
create table ascii (
id int primary key,</div>
name varchar(255)</div>
);
–rollback drop table ascii;
–changeset ascii:002
–comment INSERT TABLE
insert into ascii (id, name) values (1, ‘first’);
insert into ascii (id, name) values (2, ‘second’);
insert into ascii (id, name) values (3, ‘third’);
Am i missing something? I am running liquibase version 3.2.0.