Skip to content
Snippets Groups Projects
Commit 9c07e933 authored by Daniel Bimschas's avatar Daniel Bimschas
Browse files

HOLI-1399: change database to postgres

In order to make this work I had to work around things:

* psycopg2 > 2.9.0 is incompatible with Django 2.2, therefore used 2.8.6
  (see https://stackoverflow.com/a/68025007/1242529)
* migrations failed for a change from duration to datetime (with timezone). I modified migration
  history as we'll start with an empty DB anyways so fiddling with migration history shouldn't be
  an issue
* there was a duplicate constraint 'reporter_moderated_object_constraint' of which I renamed one
  to 'reporter_moderation_report_constraint'

To validate this MR locally, make sure you clean up your local env, e.g. by running:

```sh
python okuna-cli.py down-services-only
python okuna-cli.py clean
```

Then, stop any running docker containers related to Okuna. Subsequently, running

```
python okuna-cli.py up-services-only
```

should have Okuna start with an empty DB within postgres and successfully auto-applying migrations.
parent d4d85b78
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment