diff mbox series

[2/9] migrations: add migration for Note

Message ID 20240313065642.385843-2-andrepapoti@gmail.com
State New
Headers show
Series [1/9] models: Add Note model | expand

Commit Message

andrepapoti March 13, 2024, 6:56 a.m. UTC
Signed-off-by: andrepapoti <andrepapoti@gmail.com>
---
 patchwork/migrations/0047_note.py | 50 +++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 patchwork/migrations/0047_note.py
diff mbox series

Patch

diff --git a/patchwork/migrations/0047_note.py b/patchwork/migrations/0047_note.py
new file mode 100644
index 0000000..d63ec96
--- /dev/null
+++ b/patchwork/migrations/0047_note.py
@@ -0,0 +1,50 @@ 
+# Generated by Django 5.0.2 on 2024-03-05 16:27
+
+import django.db.models.deletion
+import django.utils.timezone
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+    dependencies = [
+        ('patchwork', '0046_patch_comment_events'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Note',
+            fields=[
+                (
+                    'id',
+                    models.AutoField(
+                        auto_created=True,
+                        primary_key=True,
+                        serialize=False,
+                        verbose_name='ID',
+                    ),
+                ),
+                (
+                    'last_modified',
+                    models.DateTimeField(default=django.utils.timezone.now),
+                ),
+                ('content', models.TextField(blank=True)),
+                ('maintainer_only', models.BooleanField(default=True)),
+                (
+                    'patch',
+                    models.ForeignKey(
+                        on_delete=django.db.models.deletion.CASCADE,
+                        related_name='note',
+                        related_query_name='note',
+                        to='patchwork.patch',
+                    ),
+                ),
+                (
+                    'submitter',
+                    models.ForeignKey(
+                        on_delete=django.db.models.deletion.CASCADE,
+                        to='patchwork.person',
+                    ),
+                ),
+            ],
+        ),
+    ]