diff options
Diffstat (limited to 'man/bolt-migration.5')
| -rw-r--r-- | man/bolt-migration.5 | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/man/bolt-migration.5 b/man/bolt-migration.5 index dd5080e..92728e8 100644 --- a/man/bolt-migration.5 +++ b/man/bolt-migration.5 @@ -26,9 +26,6 @@ for configuration details. Migration files use comment directives to separate sections. All directives are case-insensitive. .Bl -tag -width Ds -.It Cm -- depends: Ar version1, version2, ... -Declares dependencies on other migrations. Dependencies determine execution -order. Multiple versions are separated by commas. .It Cm -- migrate:up Op Ar options Marks the beginning of the upgrade section. All SQL statements following this directive until the next directive or end of file are executed when @@ -53,7 +50,7 @@ inside a transaction, such as in PostgreSQL. .El .Sh EXAMPLES -A basic migration with no dependencies: +A basic migration: .Bd -literal -offset indent -- migrate:up CREATE TABLE users ( @@ -65,36 +62,8 @@ CREATE TABLE users ( DROP TABLE users; .Ed .Pp -A migration with a single dependency: -.Bd -literal -offset indent --- depends: 20240316145038 --- migrate:up -CREATE TABLE posts ( - id SERIAL PRIMARY KEY, - user_id INTEGER NOT NULL REFERENCES users(id) -); - --- migrate:down -DROP TABLE posts; -.Ed -.Pp -A migration with multiple dependencies: -.Bd -literal -offset indent --- depends: 20240316145038, 20240317120000 --- migrate:up -CREATE TABLE comments ( - id SERIAL PRIMARY KEY, - post_id INTEGER NOT NULL REFERENCES posts(id), - user_id INTEGER NOT NULL REFERENCES users(id) -); - --- migrate:down -DROP TABLE comments; -.Ed -.Pp A non-transactional migration: .Bd -literal -offset indent --- depends: 20240316145038 -- migrate:up transaction:false CREATE INDEX CONCURRENTLY idx_users_email ON users(email); @@ -105,5 +74,4 @@ DROP INDEX CONCURRENTLY idx_users_email; .Xr bolt 1 , .Xr bolt-new 1 , .Xr bolt.toml 5 , -.Xr bolt-dependencies 7 , .Xr bolt-execution 7 |