# Empty SQL changelog file

**URL:** <https://forum.liquibase.org/t/empty-sql-changelog-file/9725>\
**Category:** General Discussion\
**Created:** [September 6, 2024, 4:13pm UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725 "2024-09-06T16:13:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aDramaQueen](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@aDramaQueen](https://forum.liquibase.org/u/aDramaQueen)\
**Post date:** [September 6, 2024, 4:13pm UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725/1 "2024-09-06T16:13:44Z")

</div>

Hi,

if i want to create a changelog file for a SQLite database (`temp-changelog.sqlite.sql`), the resulting file is empty. If I change the file type to JSON (`temp-changelog.sqlite.json`) everything works as expected.

What do I have to do, to get the SQL changelog file?

Thanks.

---

<div class="post-metadata">

**Author:** ![uwe](https://avatars.discourse-cdn.com/v4/letter/u/c57346/32.png) [@uwe](https://forum.liquibase.org/u/uwe)\
**Post date:** [September 10, 2024, 11:42am UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725/2 "2024-09-10T11:42:01Z")

</div>

@aDramaQueen  
Do you get any hint somewhere ?  
We have the same issue. We changed our Linux system from OracleLinux 7.9 to 8.9. This also updates the GNU sed … maybe this has faced the issue ?  
We are using an quite old Liquibase (3.5.3) but the upgrade is one of my next projects.  
Thanks

---

<div class="post-metadata">

**Author:** ![aDramaQueen](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@aDramaQueen](https://forum.liquibase.org/u/aDramaQueen)\
**Post date:** [September 10, 2024, 12:21pm UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725/3 "2024-09-10T12:21:29Z")

</div>

Well…, I looked up the loggings & I’m more confused than before. Here’s a snapshot of the last lines:

_NOTE 1: I am using the Liquibase [**Hibernate**](https://contribute.liquibase.com/extensions-integrations/directory/database-tutorials/hibernate/) & [**Gradle**](https://contribute.liquibase.com/extensions-integrations/directory/integration-docs/gradle/) plugins. But in the end both of them just forward to the Liquibase command line._

_NOTE 2: I am running this on my German machine._

```auto
...
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.DropDefaultValueGeneratorSnowflake
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.DropProcedureGeneratorSnowflake
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.InsertOrUpdateGeneratorSnowflake
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.RenameTableGeneratorSnowflake
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.RenameViewGeneratorSnowflake
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.SetColumnRemarksGeneratorSnowflake
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.SetTableRemarksGeneratorSnowflake
[2024-09-10 14:03:14] FEIN [liquibase.servicelocator] Loaded liquibase.sqlgenerator.SqlGenerator instance liquibase.sqlgenerator.core.GetViewDefinitionGeneratorSnowflake
[2024-09-10 14:03:14] WARNUNG [liquibase.command] Diff changelog command failed
[2024-09-10 14:03:14] INFORMATION [liquibase.command] Command execution complete
Liquibase command 'diff-changelog' was executed successfully.
[2024-09-10 14:03:14] INFORMATION [liquibase.ui] Liquibase command 'diff-changelog' was executed successfully.

```

Notice the 4 last lines:

- `Diff changelog command failed`
- `Liquibase command 'diff-changelog' was executed successfully.`

Liquibase is sending me some contradictory signals here…?!?

---

<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:** [September 10, 2024, 1:30pm UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725/4 "2024-09-10T13:30:01Z")

</div>

Example empty changesets can be found here:

> **[empty](https://docs.liquibase.com/change-types/empty.html#sql_example)**
>
> Reference information for the empty change type.

---

<div class="post-metadata">

**Author:** ![uwe](https://avatars.discourse-cdn.com/v4/letter/u/c57346/32.png) [@uwe](https://forum.liquibase.org/u/uwe)\
**Post date:** [September 11, 2024, 6:04am UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725/5 "2024-09-11T06:04:03Z")

</div>

Our problem is that the file is parsed and the source file is filled.  
It works with Oracle (Redhat) Linux 7.9 but not in 8.9.  
The File is empty in 8.9. Seems the GNU sed in the new version does it in a different way

---

<div class="post-metadata">

**Author:** ![aDramaQueen](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@aDramaQueen](https://forum.liquibase.org/u/aDramaQueen)\
**Post date:** [September 11, 2024, 8:35am UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725/6 "2024-09-11T08:35:39Z")

</div>

@uwe I already wrote a longer more detailed answer, but it was blocked since it contained links (funny enough: to the Liquibase DOCs, therefore their own website). They wrote it will be checked & posted soon. This was round about 24h ago…

Anyway, long story short, I get confusing answers from Liquibase loggings:

- Diff changelog command failed
- Liquibase command ‘diff-changelog’ was executed successfully

@daryldoak I don’t understand this response? We don’t want empty files. We want the changelog files in the SQL format. But we get an empty file instead. From the logging I can see everything works. Liquibase is recognising all necessary tables. Everything but the final step (writing it to a file) works as expected.

Furthermore, if I change the target file type to anything else (JSON, YAML, XML) it works. Just the specific case in the SQL format does not work.

---

<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:** [September 11, 2024, 2:59pm UTC](https://forum.liquibase.org/t/empty-sql-changelog-file/9725/7 "2024-09-11T14:59:52Z")

</div>

Sorry, the original question was vague, and I misunderstood it. There was no indication that you were trying to run diff-changelog.
