Breaking changes for dev setup

21 views
Skip to first unread message

Brent Moran

unread,
Feb 20, 2023, 8:04:59 AM2/20/23
to Mathesar Developers
When the PR https://github.com/centerofci/mathesar/pull/2517 is
merged, it will reset the migrations files in the Mathesar project.
After pulling from master post-merge, you have two options.

1. The easy, but destructive way:
- `docker compose --profile dev down -v`, followed by
- `docker compose --profile dev up`
This will remove your django database, any media files you've uploaded
to Mathesar, and also your test data database.

2. The trickier way, but preserving your test data:
- Log into your running postgres instance using, e.g., `psql`.
- Run `DROP DATABASE mathesar_django WITH (FORCE)`
- From another terminal window, run
`docker exec -it mathesar_service_dev python manage.py migrate`
- `docker exec -it mathesar_service_dev python manage.py createsuperuser`
- Log out of Mathesar, log back in.
This method should let you keep your testing data, but will destroy
any settings and users you have in your database. Also, no guarantees,
so export any data that's actually important to you first.

Brent
Reply all
Reply to author
Forward
0 new messages