Skip to content

Commit f7a610d

Browse files
authored
docs: add makemigrations clarification to database overview (#1377)
1 parent 79d2f78 commit f7a610d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/database/overview.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ to initialize alembic and create a migration script with the current schema.
6060
After making changes to the schema, use
6161
`reflex db makemigrations --message 'something changed'`
6262
to generate a script in the `alembic/versions` directory that will update the
63-
database schema. It is recommended that scripts be inspected before applying
64-
them.
63+
database schema. It is recommended that generated scripts be inspected before applying them.
64+
65+
Bear in mind that your newest models will not be detected by the `reflex db makemigrations`
66+
command unless imported and used somewhere within the application.
6567

6668
The `reflex db migrate` command is used to apply migration scripts to bring the
6769
database up to date. During app startup, if Reflex detects that the current
@@ -82,4 +84,4 @@ with rx.session() as session:
8284

8385
```md video https://youtube.com/embed/ITOZkzjtjUA?start=6835&end=8225
8486
# Video: Tutorial of Database Model with Forms, Model Field Changes and Migrations, and adding a DateTime Field
85-
```
87+
```

0 commit comments

Comments
 (0)