diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-03-18 12:06:04 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-03-18 12:34:33 +0100 |
| commit | 99021ffc60cb67b5af7725069adf06fe2219d22d (patch) | |
| tree | eb08a2a6d2bcb4628e134995b730ef7f29e55243 /archaeological_warehouse | |
| parent | d760e9f87fe040ab33dcdb942303d39fbf83a9c8 (diff) | |
| download | Ishtar-99021ffc60cb67b5af7725069adf06fe2219d22d.tar.bz2 Ishtar-99021ffc60cb67b5af7725069adf06fe2219d22d.zip | |
🐛 fix naive datetime in migrations
Diffstat (limited to 'archaeological_warehouse')
3 files changed, 14 insertions, 14 deletions
diff --git a/archaeological_warehouse/migrations/0101_squashed.py b/archaeological_warehouse/migrations/0101_squashed.py index 0a6472a52..7782ce43d 100644 --- a/archaeological_warehouse/migrations/0101_squashed.py +++ b/archaeological_warehouse/migrations/0101_squashed.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-01-23 18:21 -import datetime from django.conf import settings import django.contrib.gis.db.models.fields import django.contrib.postgres.fields.jsonb @@ -9,6 +8,7 @@ import django.contrib.postgres.search import django.core.validators from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import ishtar_common.models import ishtar_common.models_common import re @@ -32,7 +32,7 @@ class Migration(migrations.Migration): ('history_m2m', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default={})), ('need_update', models.BooleanField(default=False, verbose_name='Need update')), ('locked', models.BooleanField(default=False, verbose_name='Item locked for edition')), - ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('history_date', models.DateTimeField(default=django.utils.timezone.now)), ('name', models.CharField(blank=True, max_length=200, null=True, verbose_name='Name')), ('description', models.TextField(blank=True, null=True, verbose_name='Description')), ('history_creator', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL, verbose_name='Creator')), @@ -72,7 +72,7 @@ class Migration(migrations.Migration): ('history_m2m', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default={})), ('need_update', models.BooleanField(default=False, verbose_name='Need update')), ('locked', models.BooleanField(default=False, verbose_name='Item locked for edition')), - ('history_date', models.DateTimeField(default=datetime.datetime.now)), + ('history_date', models.DateTimeField(default=django.utils.timezone.now)), ('uuid', models.UUIDField(default=uuid.uuid4)), ('reference', models.TextField(verbose_name='Container ref.')), ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')), diff --git a/archaeological_warehouse/migrations/0114_auto_20220707_1633.py b/archaeological_warehouse/migrations/0114_auto_20220707_1633.py index 7c0a297e4..753148e72 100644 --- a/archaeological_warehouse/migrations/0114_auto_20220707_1633.py +++ b/archaeological_warehouse/migrations/0114_auto_20220707_1633.py @@ -1,7 +1,7 @@ # Generated by Django 2.2.24 on 2022-07-07 16:33 -import datetime from django.db import migrations, models +import django.utils.timezone class Migration(migrations.Migration): @@ -14,16 +14,16 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='container', name='last_modified', - field=models.DateTimeField(blank=True, default=datetime.datetime.now), + field=models.DateTimeField(blank=True, default=django.utils.timezone.now), ), migrations.AlterField( model_name='historicalwarehouse', name='last_modified', - field=models.DateTimeField(blank=True, default=datetime.datetime.now), + field=models.DateTimeField(blank=True, default=django.utils.timezone.now), ), migrations.AlterField( model_name='warehouse', name='last_modified', - field=models.DateTimeField(blank=True, default=datetime.datetime.now), + field=models.DateTimeField(blank=True, default=django.utils.timezone.now), ), ] diff --git a/archaeological_warehouse/migrations/0116_auto_20230202_1633.py b/archaeological_warehouse/migrations/0116_auto_20230202_1633.py index 657f950c4..c1c59e855 100644 --- a/archaeological_warehouse/migrations/0116_auto_20230202_1633.py +++ b/archaeological_warehouse/migrations/0116_auto_20230202_1633.py @@ -1,12 +1,12 @@ # Generated by Django 2.2.24 on 2023-02-02 16:33 -import datetime from django.conf import settings import django.contrib.gis.db.models.fields import django.contrib.postgres.fields.jsonb import django.contrib.postgres.search from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import simple_history.models import uuid @@ -28,7 +28,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='container', name='created', - field=models.DateTimeField(blank=True, default=datetime.datetime.now), + field=models.DateTimeField(blank=True, default=django.utils.timezone.now), ), migrations.AddField( model_name='historicalwarehouse', @@ -38,7 +38,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='historicalwarehouse', name='created', - field=models.DateTimeField(blank=True, default=datetime.datetime.now), + field=models.DateTimeField(blank=True, default=django.utils.timezone.now), ), migrations.AddField( model_name='warehouse', @@ -48,7 +48,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='warehouse', name='created', - field=models.DateTimeField(blank=True, default=datetime.datetime.now), + field=models.DateTimeField(blank=True, default=django.utils.timezone.now), ), migrations.AlterField( model_name='container', @@ -61,8 +61,8 @@ class Migration(migrations.Migration): ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), ('search_vector', django.contrib.postgres.search.SearchVectorField(blank=True, help_text='Auto filled at save', null=True, verbose_name='Search vector')), ('data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)), - ('last_modified', models.DateTimeField(blank=True, default=datetime.datetime.now)), - ('created', models.DateTimeField(blank=True, default=datetime.datetime.now)), + ('last_modified', models.DateTimeField(blank=True, default=django.utils.timezone.now)), + ('created', models.DateTimeField(blank=True, default=django.utils.timezone.now)), ('history_m2m', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)), ('need_update', models.BooleanField(default=False, verbose_name='Need update')), ('locked', models.BooleanField(default=False, verbose_name='Item locked for edition')), @@ -97,7 +97,7 @@ class Migration(migrations.Migration): ('old_reference', models.TextField(blank=True, default='', verbose_name='Old reference')), ('external_id', models.TextField(blank=True, default='', verbose_name='External ID')), ('auto_external_id', models.BooleanField(default=False, verbose_name='External ID is set automatically')), - ('history_date_deprecated', models.DateTimeField(default=datetime.datetime.now)), + ('history_date_deprecated', models.DateTimeField(default=django.utils.timezone.now)), ('history_id', models.AutoField(primary_key=True, serialize=False)), ('history_date', models.DateTimeField()), ('history_change_reason', models.CharField(max_length=100, null=True)), |
