sql formatted changelog file and "filename" attribute

I have created an sql formatted changelog file as follows


–liquibase formatted sql


–changeset testuer:007 filename:my_logical_filename

create table t1(c1 number 20,0);


–rollback drop table t1;


Everything about this works fine except that when liquibase adds to the databasechangelog table the file name column has the full physical path of the changelog file?


Is it possible to use either filename or logicalfilename in a .sql file?

I believe that i’m current.


In my test I called liquibase with the full path of the .sql file and that is what it wrote in the databasechangelog.


On my team we always set logicalFilePath= in the databasecahngelog element of our .xml files.


Many of our developers use staright sql for their conversions which is the motivation for experimenting with the .sql feature.


For the feature to become popular the following xml tag would need to work (and probably does) :


<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<databaseChangeLog xmlns=“http://www.liquibase.org/xml/ns/dbchangelog” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance


There isn’t support for specifying a logical filename in formatted sql yet. I added https://liquibase.jira.com/browse/CORE-1730 for the feature.


It should be storing the path in the databasechangelog table you used when referencing the file. Are you using an absolute path when calling the changelog file?

What version of liquibase are you using?

Nathan

Yes, that feature should work. You can mix and match formats in your .  I’ll look into the full file path issue you are seeing.


Nathan