# Control Liquibase Changeset Execution Order

**URL:** <https://forum.liquibase.org/t/control-liquibase-changeset-execution-order/9113>\
**Category:** General Discussion\
**Created:** [February 15, 2024, 8:39am UTC](https://forum.liquibase.org/t/control-liquibase-changeset-execution-order/9113 "2024-02-15T08:39:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![olylll97lll](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@olylll97lll](https://forum.liquibase.org/u/olylll97lll)\
**Post date:** [February 15, 2024, 8:39am UTC](https://forum.liquibase.org/t/control-liquibase-changeset-execution-order/9113/1 "2024-02-15T08:39:53Z")

</div>

I have a list of change set which the naming have prefix like AAA-1 AAA-2… AAA-11.  
The problem I am having is that the Liquibase actually run AAA-11 before AAA-2.  
Can I somehow change this behavior ?

---

<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:** [February 15, 2024, 2:16pm UTC](https://forum.liquibase.org/t/control-liquibase-changeset-execution-order/9113/2 "2024-02-15T14:16:04Z")

</div>

I assume you are using “includeAll” in your master changelog. The documentation for includeAll says this:

“All files inside of the included directory are run in alphabetical order.”

> **[includeAll](https://docs.liquibase.com/change-types/includeall.html)**
>
> The includeAll tag allows you to specify a directory that contains multiple changelog files. It is used within your root changelog file to call on the directory and include all XML files as changelog files, and all SQL files as individual changes.

If this behavior doesn’t work for your files then the alternative is to user “include”, where you explicitly specify the execution order of the changelogs.

> **[include](https://docs.liquibase.com/change-types/include.html)**
>
> The include tag allows you to break up your changelogs into more manageable pieces. Use the include tag in the root changelog to reference other changelogs.

---

<div class="post-metadata">

**Author:** ![Helene](https://avatars.discourse-cdn.com/v4/letter/h/7993a0/32.png) [@Helene](https://forum.liquibase.org/u/Helene)\
**Post date:** [February 21, 2024, 4:54pm UTC](https://forum.liquibase.org/t/control-liquibase-changeset-execution-order/9113/3 "2024-02-21T16:54:22Z")

</div>

We use includeAll, and it works great. You just need a minor change to how you name your files.

We have chosen to use numeric prefix in file names, and always with two digits. So the filenames would be like this:  
01-AAA  
02-AAA  
…  
11-AAA
