Add version 9.6 to feature matrix
authorMagnus Hagander <magnus@hagander.net>
Thu, 22 Sep 2016 12:57:29 +0000 (14:57 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 22 Sep 2016 12:57:29 +0000 (14:57 +0200)
By default it's hidden, and we copy the current value for all features
from 9.5.

pgweb/featurematrix/migrations/0002_featurematrix_96.py [new file with mode: 0644]
pgweb/featurematrix/models.py

diff --git a/pgweb/featurematrix/migrations/0002_featurematrix_96.py b/pgweb/featurematrix/migrations/0002_featurematrix_96.py
new file mode 100644 (file)
index 0000000..df798fc
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('featurematrix', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='feature',
+            name='v96',
+            field=models.IntegerField(default=0, verbose_name=b'9.6', choices=[(0, b'No'), (1, b'Yes'), (2, b'Obsolete'), (3, b'?')]),
+        ),
+               migrations.RunSQL("UPDATE featurematrix_feature SET v96=v95 WHERE NOT v96=v95"),
+    ]
index 087ea8a3f539698aadc92996bc394b62075228d5..193f547b98a002f5738d68370d87f4bfe7a008e4 100644 (file)
@@ -41,6 +41,8 @@ class Feature(models.Model):
        v93 = models.IntegerField(verbose_name="9.3", null=False, blank=False, default=0, choices=choices)
        v94 = models.IntegerField(verbose_name="9.4", null=False, blank=False, default=0, choices=choices)
        v95 = models.IntegerField(verbose_name="9.5", null=False, blank=False, default=0, choices=choices)
+       v96 = models.IntegerField(verbose_name="9.6", null=False, blank=False, default=0, choices=choices)
+       v96.visible_default = False
 
        purge_urls = ('/about/featurematrix/.*', )