# sql formatted changelog file and "filename" attribute

**URL:** <https://forum.liquibase.org/t/sql-formatted-changelog-file-and-filename-attribute/2871>\
**Category:** General Discussion\
**Created:** [January 27, 2014, 11:48pm UTC](https://forum.liquibase.org/t/sql-formatted-changelog-file-and-filename-attribute/2871 "2014-01-27T23:48:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Paul](https://forum.liquibase.org/u/Paul)\
**Post date:** [January 27, 2014, 11:48pm UTC](https://forum.liquibase.org/t/sql-formatted-changelog-file-and-filename-attribute/2871/1 "2014-01-27T23:48:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pmendelson](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@pmendelson](https://forum.liquibase.org/u/pmendelson)\
**Post date:** [January 27, 2014, 11:48pm UTC](https://forum.liquibase.org/t/sql-formatted-changelog-file-and-filename-attribute/2871/2 "2014-01-27T23:48:00Z")

</div>

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](http://www.liquibase.org/xml/ns/dbchangelog)” xmlns:xsi=“[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)”

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [January 27, 2014, 11:48pm UTC](https://forum.liquibase.org/t/sql-formatted-changelog-file-and-filename-attribute/2871/3 "2014-01-27T23:48:00Z")

</div>

There isn’t support for specifying a logical filename in formatted sql yet. I added&nbsp;[https://liquibase.jira.com/browse/CORE-1730](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

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [January 27, 2014, 11:48pm UTC](https://forum.liquibase.org/t/sql-formatted-changelog-file-and-filename-attribute/2871/4 "2014-01-27T23:48:00Z")

</div>

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

Nathan
