Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure IDs of liquibase changesets

Is there any way to configure the IDs of liquibase changesets? I mean for example at id="1528876614155-1" the first part is autogenerated and the second part is the number of changeset. Is there a way to configure the first part by myself?

like image 467
Mad Scientist Avatar asked Dec 01 '25 22:12

Mad Scientist


1 Answers

The number you have shown is only generated by Liquibase if you do reverse engineering of an existing schema.

So, if your question is: "Can I change the way Liquibase generates those numbers during reverse engineering?", then the answer is no (unless you use a different way to generate a changelog from an existing schema). But it shouldn't be a big problem to do a search & replace using a regex to change that number into something else.

If your question is: "Can I use a different pattern once I start manually adding changesets?", then the answer is yes: you can add whatever you want for an ID of a changeset. The only limit you have is that it may not exceed 255 characters (as that is the size of the column where this value is stored).


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!