Adding intro and outro.
[audio.git] / src / archive / migrations / 0025_create_config.py
diff --git a/src/archive/migrations/0025_create_config.py b/src/archive/migrations/0025_create_config.py
new file mode 100644 (file)
index 0000000..f297676
--- /dev/null
@@ -0,0 +1,25 @@
+# Generated by Django 3.1.14 on 2021-12-22 16:00
+
+from django.db import migrations
+
+
+def create_config(apps, schema_editor):
+    Config = apps.get_model('archive', 'Config')
+    Project = apps.get_model('archive', 'Project')
+    c = Config.objects.create(name='Wolne Lektury', intro_min_seconds=0, outro_min_seconds=0)
+    Project.objects.all().update(config=c)
+    
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('archive', '0024_auto_20211222_1604'),
+    ]
+
+    operations = [
+        migrations.RunPython(
+            create_config,
+            migrations.RunPython.noop
+        )
+    ]