Script file name format

Migration script file name format is V{version}__{datetime}{options}__{description}.sql where:

  • {version} can be any numbers with dots, e.g.: 1, 1.1, 1.2.3, 1.2020.01.24
  • {datetime} is script date and time (in UTC) with year, month, day, hours, minutes, seconds in yyyy.MM.dd_HHmmss format
  • {options} allows to specify script execution options. It can be empty to not use any option. The following options are supported:
    • __NOTRANSACTION - executes a script without a transaction. Useful for SQL statements that do not support transactions, e.g. ALTER DATABASE
  • {description} is any characters that describe what migration script does. Maximum file length and character restrictions for file name apply

When applying scripts to the database, they are ordered by {version} number first and only then by {datetime} and {description}.

Why? This allows database branching.