The most common type of migration is a versioned migration. Each versioned migration has a unique version and is
applied exactly once.
- Creating/altering/dropping tables/indexes/foreign keys/enums/UDTs/...
- Reference data updates
- User data corrections
Each versioned migration must have a unique version and a description.
A version must have the following structure:
- One or more numeric parts
- Separated by a dot (.) or an underscore (_)
- Underscores are replaced by dots at runtime
- Leading zeroes are ignored in each part
Examples of valid versions:
- 5_2 (5.2 at runtime)
CREATE TABLE cars (
id INT NOT NULL PRIMARY KEY,
license_plate VARCHAR NOT NULL,
color VARCHAR NOT NULL