datatracker/ietf/utils/migrations/0003_pause_to_change_use_tz.py
Jennifer Richards c2c17cfeb1
chore: enforce USE_TZ setting expectations in migrations (#4386)
* chore: enforce USE_TZ setting expectations in migrations

* chore: keep USE_TZ=False until changed manually
2022-08-30 12:10:59 -03:00

24 lines
583 B
Python

# Generated by Django 2.2.28 on 2022-08-29 10:16
from django.conf import settings
from django.db import migrations
def forward(apps, schema_editor):
assert getattr(settings, 'USE_TZ', False), 'Please change USE_TZ to True before continuing.'
def reverse(apps, schema_editor):
assert not getattr(settings, 'USE_TZ', False), 'Please change USE_TZ to False before continuing.'
class Migration(migrations.Migration):
dependencies = [
('utils', '0002_convert_timestamps_to_utc'),
]
operations = [
migrations.RunPython(forward, reverse),
]