Skip to content

Commit b8f8600

Browse files
committed
DB: about automatic migrations
1 parent 9b55e68 commit b8f8600

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

databases.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,17 @@ More info [here](https://stackoverflow.com/questions/38811931/how-to-change-clas
420420

421421
### Migrations
422422

423-
First create the tables if needed:
423+
We can run database migrations manually, as shown below, and we can
424+
automatically run migrations after a change to the model
425+
definitions. To do that, set `mito:*auto-migration-mode*` to `t`.
426+
427+
The first step is to create the tables, if needed:
424428

425429
~~~lisp
426430
(ensure-table-exists 'user)
427431
~~~
428432

429-
then alter the tables, if needed:
433+
then alter the tables:
430434

431435
~~~lisp
432436
(mito:migrate-table 'user)

0 commit comments

Comments
 (0)