aboutsummaryrefslogtreecommitdiffstats
path: root/man/bolt-tutorial.7
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-11-13 22:13:14 -0800
committerEugene Triguba <hello@eugenetriguba.com>2026-11-13 22:13:14 -0800
commit9656e14fc758053f34f5cb0e906093e2a18f6162 (patch)
tree3d7799305de92be6a09bcd12c29fe0843b7b8cab /man/bolt-tutorial.7
parentRemove migration dependencies (diff)
downloadcli-9656e14fc758053f34f5cb0e906093e2a18f6162.zip
Remove timestamp version style in favor of always using sequential
Diffstat (limited to 'man/bolt-tutorial.7')
-rw-r--r--man/bolt-tutorial.732
1 files changed, 16 insertions, 16 deletions
diff --git a/man/bolt-tutorial.7 b/man/bolt-tutorial.7
index 0a137a0..ae2446e 100644
--- a/man/bolt-tutorial.7
+++ b/man/bolt-tutorial.7
@@ -16,6 +16,19 @@ Bolt installed
.It
A database available (PostgreSQL, MySQL, SQL Server, or SQLite)
.El
+.Sh CONFIGURING BOLT
+Create a
+.Pa bolt.toml
+file:
+.Bd -literal -offset indent
+[database]
+dsn = "bolt.db"
+driver = "sqlite3"
+.Ed
+.Pp
+See
+.Xr bolt.toml 5
+for all configuration options.
.Sh CREATING YOUR FIRST MIGRATION
Create a migration with:
.Dl $ bolt new -m \(dqcreate users table\(dq
@@ -23,7 +36,7 @@ Create a migration with:
This creates a
.Pa migrations/
directory with a file like:
-.Dl 20240316145038_create_users_table.sql
+.Dl 001_create_users_table.sql
.Sh WRITING MIGRATION SCRIPTS
Edit the migration file to add SQL statements:
.Bd -literal -offset indent
@@ -45,25 +58,12 @@ section runs when applying the migration.
The
.Cm -- migrate:down
section runs when reverting it.
-.Sh CONFIGURING BOLT
-Create a
-.Pa bolt.toml
-file:
-.Bd -literal -offset indent
-[database]
-dsn = "postgresql://user:password@localhost:5432/mydb?sslmode=disable"
-driver = "postgresql"
-.Ed
-.Pp
-See
-.Xr bolt.toml 5
-for all configuration options.
.Sh APPLYING MIGRATIONS
Apply all pending migrations:
.Dl $ bolt up
.Pp
Apply up to a specific version:
-.Dl $ bolt up -v 20240316145038
+.Dl $ bolt up -v 001
.Sh CHECKING STATUS
View migration status:
.Dl $ bolt status
@@ -74,7 +74,7 @@ Revert the most recent migration:
.Dl $ bolt down
.Pp
Revert to a specific version:
-.Dl $ bolt down -v 20240316145038
+.Dl $ bolt down -v 001
.Sh SEE ALSO
.Xr bolt 1 ,
.Xr bolt.toml 5 ,