summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/migrations
diff options
context:
space:
mode:
authorMagnus Hagander2018-12-23 12:07:56 +0000
committerMagnus Hagander2018-12-23 12:07:56 +0000
commit535af6e586adae94bdc8502fb78602877345dad8 (patch)
tree6a793c0b899bce37679edb4edff19d64c4d85e2c /pgcommitfest/commitfest/migrations
parent41ce86f574a20bc378570998f330b9ac72391b13 (diff)
Add "withdrawn" commitfest status
By popular (?) request
Diffstat (limited to 'pgcommitfest/commitfest/migrations')
-rw-r--r--pgcommitfest/commitfest/migrations/0003_withdrawn_status.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/pgcommitfest/commitfest/migrations/0003_withdrawn_status.py b/pgcommitfest/commitfest/migrations/0003_withdrawn_status.py
new file mode 100644
index 0000000..346adf9
--- /dev/null
+++ b/pgcommitfest/commitfest/migrations/0003_withdrawn_status.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('commitfest', '0002_notifications'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='patchoncommitfest',
+ name='status',
+ field=models.IntegerField(default=1, choices=[(1, b'Needs review'), (2, b'Waiting on Author'), (3, b'Ready for Committer'), (4, b'Committed'), (5, b'Moved to next CF'), (6, b'Rejected'), (7, b'Returned with feedback'), (8, b'Withdrawn')]),
+ ),
+ migrations.RunSQL("""
+INSERT INTO commitfest_patchstatus (status, statusstring, sortkey) VALUES
+(1,'Needs review',10),
+(2,'Waiting on Author',15),
+(3,'Ready for Committer',20),
+(4,'Committed',25),
+(5,'Moved to next CF',30),
+(6,'Rejected',50),
+(7,'Returned with Feedback',50),
+(8,'Withdrawn', 50)
+ON CONFLICT (status) DO UPDATE SET statusstring=excluded.statusstring, sortkey=excluded.sortkey;
+"""),
+ migrations.RunSQL("DELETE FROM commitfest_patchstatus WHERE status < 1 OR status > 8"),
+ ]