Kuberchaun
Kuberchaun

Reputation: 30342

Formatted SQL With Comment

I can't get my comment added to the liquibase change log table. When I do a updateSQL the generated insert for the log table has a blank string for the comment I added no matter what format of comment I try to use. My file looks like the one below.

Any ideas on how to add a comment so it gets inserted into the log table? 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';

Upvotes: 2

Views: 2162

Answers (1)

Nathan Voxland
Nathan Voxland

Reputation: 15773

The formatted SQL parser does not support setting comments. It is not that it is trying to set the comments but it is not grabbing the string correctly, it just does not look for a --comment string at all.

Nathan

Upvotes: 2

Related Questions