diff --git a/apps/push_notifications/migrations/0001_initial.py b/apps/push_notifications/migrations/0001_initial.py new file mode 100644 index 0000000..22c29a4 --- /dev/null +++ b/apps/push_notifications/migrations/0001_initial.py @@ -0,0 +1,50 @@ +# Generated by Django 5.2.3 on 2025-07-15 09:38 + +import django.db.models.deletion +import uuid +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + migrations.swappable_dependency(settings.OAUTH2_PROVIDER_APPLICATION_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='PushUser', + fields=[ + ('uuid', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)), + ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), + ('updated_at', models.DateTimeField(auto_now=True, db_index=True)), + ('client_token', models.CharField(blank=True, max_length=32, null=True)), + ('application_token', models.CharField(blank=True, max_length=32, null=True)), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='PushMessage', + fields=[ + ('uuid', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)), + ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), + ('updated_at', models.DateTimeField(auto_now=True, db_index=True)), + ('title', models.CharField(max_length=128)), + ('message', models.TextField()), + ('priority', models.IntegerField(default=5)), + ('extras', models.JSONField(default=dict)), + ('application', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)), + ('push_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='push_notifications.pushuser')), + ], + options={ + 'abstract': False, + }, + ), + ]