Is there a naming convention for liquibase files?

Is there any name convention for files?

Right now we got convention:
[ order number | operation with table name ]

db/changelog/ 003-create-table-financial_transactions.yaml
db/changelog/ 004-insert-into-financial_transactions.yaml

Is order number good idea?
Rest of the file name: create table TABLE_NAME? It should be name of the table (financial_transactions) or name of programming language entity (FinancialTranscation)?

Data for table financial_transaction:
src/main/resources/db/changelog/data/financialTransaction.csv
So again - name should be name of the table or entity?

  • financialTransaction.csv
  • financial_transaction.csv
  • FinancialTransaction.csv

Liquibase does not require any name convention for files. You can name your files using whatever naming convention works for your team/company.

I personally don’t like including a sequence number in filenames. It prevents you from easily adding a new file in the middle of an existing sequence.

1 Like

The ordinal number enforces proper sorting and running of scripts/configurations. And by the way, it can prevent you from adding anything in between.

But I understand your view perfectly well.

1 Like

Based upon your answer I assume you are using includeAll. Makes sense then why you are using the sequence numbers.