From 4d1a4c8ba0ff8c4bf3afaaa97100ebb4904b87a5 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Thu, 20 Jun 2024 10:19:11 -0400 Subject: [PATCH] Squash migration of new model --- test_app/migrations/0001_initial.py | 17 ++++++++++++++ test_app/migrations/0011_publicdata.py | 32 -------------------------- 2 files changed, 17 insertions(+), 32 deletions(-) delete mode 100644 test_app/migrations/0011_publicdata.py diff --git a/test_app/migrations/0001_initial.py b/test_app/migrations/0001_initial.py index 83e029f18..bdeccd058 100644 --- a/test_app/migrations/0001_initial.py +++ b/test_app/migrations/0001_initial.py @@ -300,4 +300,21 @@ class Migration(migrations.Migration): 'abstract': False, }, ), + migrations.CreateModel( + name='PublicData', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('modified', models.DateTimeField(auto_now=True, help_text='The date/time this resource was created')), + ('created', models.DateTimeField(auto_now_add=True, help_text='The date/time this resource was created')), + ('name', models.CharField(help_text='The name of this resource', max_length=512)), + ('data', models.JSONField(blank=True, default=dict)), + ('created_by', models.ForeignKey(default=None, editable=False, help_text='The user who created this resource', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL)), + ('modified_by', models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL)), + ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='public_data', to='test_app.organization')), + ], + options={ + 'ordering': ['id'], + 'default_permissions': ('add', 'change', 'delete'), + }, + ), ] diff --git a/test_app/migrations/0011_publicdata.py b/test_app/migrations/0011_publicdata.py deleted file mode 100644 index cf18dca90..000000000 --- a/test_app/migrations/0011_publicdata.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 4.2.6 on 2024-06-14 14:50 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('test_app', '0010_manageduser'), - ] - - operations = [ - migrations.CreateModel( - name='PublicData', - fields=[ - ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('modified', models.DateTimeField(auto_now=True, help_text='The date/time this resource was created')), - ('created', models.DateTimeField(auto_now_add=True, help_text='The date/time this resource was created')), - ('name', models.CharField(help_text='The name of this resource', max_length=512)), - ('data', models.JSONField(blank=True, default=dict)), - ('created_by', models.ForeignKey(default=None, editable=False, help_text='The user who created this resource', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL)), - ('modified_by', models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL)), - ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='public_data', to='test_app.organization')), - ], - options={ - 'ordering': ['id'], - 'default_permissions': ('add', 'change', 'delete'), - }, - ), - ]