datatracker/ietf/utils/migrations/0004_pause_to_change_database_engines.py
Robert Sparks 27fccc6ba0
feat: move to postgresql (#4744)
* feat: move to postgresql

* fix: repair fractional replace statement

* fix: use pathlib to manipulate settings_local

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: do two string replacements, not one followed by another that throws away the first.

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: use pathlib again to manipulate settings_local

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: properly use assert (1/2)

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: properly use assert (2/2)

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>
2022-11-11 11:01:01 +00:00

21 lines
655 B
Python

# Generated by Django 2.2.28 on 2022-11-10 09:27
from django.conf import settings
from django.db import migrations
def forward(apps, schema_editor):
assert settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2', 'Please change to use postgres before continuing'
def reverse(apps, schema_editor):
assert settings.DATABASES['default']['ENGINE'] == 'django.db.backends.mysql', 'Please change to use mariadb before continuing'
class Migration(migrations.Migration):
dependencies = [
('utils', '0003_pause_to_change_use_tz'),
]
operations = [
migrations.RunPython(forward, reverse),
]