Skip to content

Commit fefb9af

Browse files
committed
Add docs with some DB commands
1 parent f1c1ac0 commit fefb9af

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,27 @@ Bucket: ami
143143
## Email
144144

145145
The local environment uses the `console` email backend. To view emails sent by the platform, check the console output (run the `docker compose logs -f django celeryworker` command).
146+
147+
## Database
148+
149+
The local environment uses a local PostgreSQL database in a Docker container.
150+
151+
### Backup and Restore
152+
153+
docker compose run --rm postgres backup
154+
155+
### Reset the database
156+
157+
docker compose run --rm django python manage.py reset_db
158+
159+
### Show backups
160+
161+
docker compose run --rm postgres backups
162+
163+
### Restore a backup
164+
165+
docker compose run --rm postgres restore <backup_file_name>
166+
167+
### Load fixtures with test data
168+
169+
docker compose run --rm django python manage.py migrate

0 commit comments

Comments
 (0)