From cb2356c4e4aed6e5520b6881ae6d15bb8e2b5c72 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Thu, 19 Feb 2026 17:26:20 +0100 Subject: [PATCH] added missing migrations and finished admin feature implementation --- .../api/migrations/0028_job_systemconfig.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 backend/api/migrations/0028_job_systemconfig.py diff --git a/backend/api/migrations/0028_job_systemconfig.py b/backend/api/migrations/0028_job_systemconfig.py new file mode 100644 index 0000000..f4e6b57 --- /dev/null +++ b/backend/api/migrations/0028_job_systemconfig.py @@ -0,0 +1,40 @@ +# Generated by Django 6.0.2 on 2026-02-19 16:26 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0027_alter_notification_notification_type'), + ] + + operations = [ + migrations.CreateModel( + name='Job', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(choices=[('sync_flavors', 'Sync Shopify Flavors'), ('cleanup_duplicates', 'Cleanup Duplicate Flavors'), ('backup_db', 'Database Backup'), ('seed_legacy', 'Seed Legacy Data')], max_length=100)), + ('status', models.CharField(choices=[('pending', 'Pending'), ('running', 'Running'), ('completed', 'Completed'), ('failed', 'Failed')], default='pending', max_length=20)), + ('last_run', models.DateTimeField(blank=True, null=True)), + ('next_run', models.DateTimeField(blank=True, null=True)), + ('interval_hours', models.IntegerField(default=0, help_text='Set to 0 to disable periodic run.')), + ('last_output', models.TextField(blank=True)), + ('error_message', models.TextField(blank=True)), + ], + ), + migrations.CreateModel( + name='SystemConfig', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('site_name', models.CharField(default='Holy Flavors Archive', max_length=100)), + ('maintenance_mode', models.BooleanField(default=False)), + ('allow_new_signups', models.BooleanField(default=True)), + ('require_email_verification', models.BooleanField(default=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ], + options={ + 'verbose_name': 'System Configuration', + }, + ), + ]