[PATCH 2/9] migrations: add migration for Note

andrepapoti andrepapoti at gmail.com
Wed Mar 13 17:56:34 AEDT 2024


Signed-off-by: andrepapoti <andrepapoti at gmail.com>
---
 patchwork/migrations/0047_note.py | 50 +++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 patchwork/migrations/0047_note.py

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',
+                    ),
+                ),
+            ],
+        ),
+    ]
-- 
2.44.0



More information about the Patchwork mailing list