# How to tagDatabase on changelogs in SQL Format?

**URL:** <https://forum.liquibase.org/t/how-to-tagdatabase-on-changelogs-in-sql-format/4915>\
**Category:** Community Answers\
**Created:** [December 21, 2020, 4:16am UTC](https://forum.liquibase.org/t/how-to-tagdatabase-on-changelogs-in-sql-format/4915 "2020-12-21T04:16:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frodogg](https://avatars.discourse-cdn.com/v4/letter/f/cab0a1/32.png) [@frodogg](https://forum.liquibase.org/u/frodogg)\
**Post date:** [December 21, 2020, 4:16am UTC](https://forum.liquibase.org/t/how-to-tagdatabase-on-changelogs-in-sql-format/4915/1 "2020-12-21T04:16:48Z")

</div>

Hello team:

Im just using liquibase for the first time… and so far, I just have one single doubt: how can I use “tags” in a changelog in SQL format?

what I mean is, that inside the changelog file, if there is any way to use it. Im already familiar with the “tag” command in the cli. But, the question is more oriented to if there is a way to accomplish the same result from the changelog itself.

PD: after reading a while, I saw that several users are taking a workaround and updating manully the DATABASECHANGELOG table. I don’t think that this is the correct way to do this.

So, any advice will be appreciated. thanks a lot to the community for your support.

Best regards to all

---

<div class="post-metadata">

**Author:** ![frodogg](https://avatars.discourse-cdn.com/v4/letter/f/cab0a1/32.png) [@frodogg](https://forum.liquibase.org/u/frodogg)\
**Post date:** [December 21, 2020, 4:41am UTC](https://forum.liquibase.org/t/how-to-tagdatabase-on-changelogs-in-sql-format/4915/2 "2020-12-21T04:41:14Z")

</div>

I already try with:

–changeset alex:2 endDelimiter:@ rollbackEndDelimiter:@ tag:version\_1.4  
–changeset alex:2 endDelimiter:@ rollbackEndDelimiter:@ tagDatabase: tag:version\_1.4  
–changeset alex:2 endDelimiter:@ rollbackEndDelimiter:@ tag:“version\_1.4”  
–changeset alex:2 endDelimiter:@ rollbackEndDelimiter:@ tagDatabase: tag:“version\_1.4”

–liquibase formatted sql  
–tagDatabase: tag:“version\_1.4”

–liquibase formatted sql  
–tagDatabase:“version\_1.4”

–changeset alex:2 endDelimiter:@ rollbackEndDelimiter:@  
–tagDatabase: tag:“version\_1.4”

–changeset alex:2 endDelimiter:@ rollbackEndDelimiter:@  
–tagDatabase:“version\_1.4”

so far… none of these ways works ( the “TAG” field in DATABASECHANGELOG table is not updated with the tag value )

Best regards

---

<div class="post-metadata">

**Author:** ![jchaplin](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@jchaplin](https://forum.liquibase.org/u/jchaplin)\
**Post date:** [July 14, 2021, 1:16pm UTC](https://forum.liquibase.org/t/how-to-tagdatabase-on-changelogs-in-sql-format/4915/3 "2021-07-14T13:16:59Z")

</div>

Has anyone found a solution to this?

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [July 14, 2021, 1:28pm UTC](https://forum.liquibase.org/t/how-to-tagdatabase-on-changelogs-in-sql-format/4915/4 "2021-07-14T13:28:46Z")

</div>

The tagDatabase change-type is only available in xml, yaml, and json:

[https://docs.liquibase.com/change-types/community/tag-database.html](https://docs.liquibase.com/change-types/community/tag-database.html)

An alternative is to use the Liquibase “tag” command to tag your database:

[https://docs.liquibase.com/commands/community/tag.html](https://docs.liquibase.com/commands/community/tag.html)
