mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	migrations: Squash most confirmation migrations.
Generated using the squashmigrations tool, with: - A tiny Django patch to avoid special handling of the temporary EmailChangeStatus proxy model. - Switching AddIndexConcurrently to AddIndex to help squashing. This may not have been necessary. Migration 0015 was not squashed because of its dependency on newer zerver migrations.
This commit is contained in:
		@@ -0,0 +1,90 @@
 | 
				
			|||||||
 | 
					# Generated by Django 5.0.7 on 2024-08-13 19:41
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import django.db.models.deletion
 | 
				
			||||||
 | 
					import django.utils.timezone
 | 
				
			||||||
 | 
					from django.db import migrations, models
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class Migration(migrations.Migration):
 | 
				
			||||||
 | 
					    replaces = [
 | 
				
			||||||
 | 
					        ("confirmation", "0001_initial"),
 | 
				
			||||||
 | 
					        ("confirmation", "0002_realmcreationkey"),
 | 
				
			||||||
 | 
					        ("confirmation", "0003_emailchangeconfirmation"),
 | 
				
			||||||
 | 
					        ("confirmation", "0004_remove_confirmationmanager"),
 | 
				
			||||||
 | 
					        ("confirmation", "0005_confirmation_realm"),
 | 
				
			||||||
 | 
					        ("confirmation", "0006_realmcreationkey_presume_email_valid"),
 | 
				
			||||||
 | 
					        ("confirmation", "0007_add_indexes"),
 | 
				
			||||||
 | 
					        ("confirmation", "0008_confirmation_expiry_date"),
 | 
				
			||||||
 | 
					        ("confirmation", "0009_confirmation_expiry_date_backfill"),
 | 
				
			||||||
 | 
					        ("confirmation", "0010_alter_confirmation_expiry_date"),
 | 
				
			||||||
 | 
					        ("confirmation", "0011_alter_confirmation_expiry_date"),
 | 
				
			||||||
 | 
					        ("confirmation", "0012_alter_confirmation_id"),
 | 
				
			||||||
 | 
					        ("confirmation", "0013_alter_realmcreationkey_id"),
 | 
				
			||||||
 | 
					        ("confirmation", "0014_confirmation_confirmatio_content_80155a_idx"),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    initial = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dependencies = [
 | 
				
			||||||
 | 
					        ("contenttypes", "0001_initial"),
 | 
				
			||||||
 | 
					        ("zerver", "0001_initial"),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    operations = [
 | 
				
			||||||
 | 
					        migrations.CreateModel(
 | 
				
			||||||
 | 
					            name="RealmCreationKey",
 | 
				
			||||||
 | 
					            fields=[
 | 
				
			||||||
 | 
					                (
 | 
				
			||||||
 | 
					                    "id",
 | 
				
			||||||
 | 
					                    models.BigAutoField(
 | 
				
			||||||
 | 
					                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
 | 
				
			||||||
 | 
					                    ),
 | 
				
			||||||
 | 
					                ),
 | 
				
			||||||
 | 
					                (
 | 
				
			||||||
 | 
					                    "creation_key",
 | 
				
			||||||
 | 
					                    models.CharField(db_index=True, max_length=40, verbose_name="activation key"),
 | 
				
			||||||
 | 
					                ),
 | 
				
			||||||
 | 
					                (
 | 
				
			||||||
 | 
					                    "date_created",
 | 
				
			||||||
 | 
					                    models.DateTimeField(default=django.utils.timezone.now, verbose_name="created"),
 | 
				
			||||||
 | 
					                ),
 | 
				
			||||||
 | 
					                ("presume_email_valid", models.BooleanField(default=False)),
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					        migrations.CreateModel(
 | 
				
			||||||
 | 
					            name="Confirmation",
 | 
				
			||||||
 | 
					            fields=[
 | 
				
			||||||
 | 
					                (
 | 
				
			||||||
 | 
					                    "id",
 | 
				
			||||||
 | 
					                    models.BigAutoField(
 | 
				
			||||||
 | 
					                        auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
 | 
				
			||||||
 | 
					                    ),
 | 
				
			||||||
 | 
					                ),
 | 
				
			||||||
 | 
					                ("object_id", models.PositiveIntegerField(db_index=True)),
 | 
				
			||||||
 | 
					                ("date_sent", models.DateTimeField(db_index=True)),
 | 
				
			||||||
 | 
					                ("confirmation_key", models.CharField(db_index=True, max_length=40)),
 | 
				
			||||||
 | 
					                (
 | 
				
			||||||
 | 
					                    "content_type",
 | 
				
			||||||
 | 
					                    models.ForeignKey(
 | 
				
			||||||
 | 
					                        on_delete=django.db.models.deletion.CASCADE, to="contenttypes.contenttype"
 | 
				
			||||||
 | 
					                    ),
 | 
				
			||||||
 | 
					                ),
 | 
				
			||||||
 | 
					                ("type", models.PositiveSmallIntegerField()),
 | 
				
			||||||
 | 
					                (
 | 
				
			||||||
 | 
					                    "realm",
 | 
				
			||||||
 | 
					                    models.ForeignKey(
 | 
				
			||||||
 | 
					                        null=True, on_delete=django.db.models.deletion.CASCADE, to="zerver.realm"
 | 
				
			||||||
 | 
					                    ),
 | 
				
			||||||
 | 
					                ),
 | 
				
			||||||
 | 
					                ("expiry_date", models.DateTimeField(db_index=True, null=True)),
 | 
				
			||||||
 | 
					            ],
 | 
				
			||||||
 | 
					            options={
 | 
				
			||||||
 | 
					                "unique_together": {("type", "confirmation_key")},
 | 
				
			||||||
 | 
					                "indexes": [
 | 
				
			||||||
 | 
					                    models.Index(
 | 
				
			||||||
 | 
					                        fields=["content_type", "object_id"], name="confirmatio_content_80155a_idx"
 | 
				
			||||||
 | 
					                    )
 | 
				
			||||||
 | 
					                ],
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					        ),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
		Reference in New Issue
	
	Block a user