mongock / mongock

Lightweight Java based migration tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

State that the order of a ChangeUnit is alphabetically (documentation/website issue)

SebastianOltmanns opened this issue · comments

Description

The order of ChangeUnits is sorted alphabetically. This is not seen on the documentation website (see the following image, taken from https://docs.mongock.io/v5/migration/#changeunit-attributes):
grafik

PRIORITY

MINOR

Additional context

In the javadoc, the ChangeUnit.order field actually refers to the documentation of ChangeSet.order, which states that the sorting is done alphabetically. I was, however, searching on the website. Took me quite some time to find the issue. Because this website always is the first result on search engines, it should definitly be noted there.

Example:
ChangeUnits with orders "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" will run in the following order:
"1", "10", "11", "2", "3", "4", "5", "6", "7", "8", "9"

ChangeUnits with orders "001", "002", "003", "004", "005", "006", "007", "008", "009", "010", "011" will run in the following order:
"001", "002", "003", "004", "005", "006", "007", "008", "009", "010", "011"

Hello @SebastianOltmanns , we have just updated the documentation to clarify the order behavior. Thanks.