[PATCH 09/10] Add delegate to migrations

Mauro Carvalho Chehab mchehab at osg.samsung.com
Sat Nov 28 23:14:45 AEDT 2015


Signed-off-by: Mauro Carvalho Chehab <mchehab at osg.samsung.com>
---
 patchwork/migrations/0001_initial.py | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/patchwork/migrations/0001_initial.py b/patchwork/migrations/0001_initial.py
index 65d1c3556414..5b71f3ef5385 100644
--- a/patchwork/migrations/0001_initial.py
+++ b/patchwork/migrations/0001_initial.py
@@ -165,6 +165,30 @@ class Migration(migrations.Migration):
                 ('orig_state', models.ForeignKey(to='patchwork.State')),
             ],
         ),
+        migrations.CreateModel(
+            name='DelegationRule',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('path', models.CharField(max_length=255, validators=[patchwork.models.validate_rule_path])),
+                ('priority', models.IntegerField(default=0)),
+                ('project', models.ForeignKey(to='patchwork.Project')),
+                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
+            ],
+            options={
+                'ordering': ['-priority', 'path'],
+            },
+            bases=(models.Model,),
+        ),
+        migrations.AlterUniqueTogether(
+            name='delegationrule',
+            unique_together=set([('path', 'project')]),
+        ),
+        migrations.AlterField(
+            model_name='patch',
+            name='state',
+            field=models.ForeignKey(default=patchwork.models.get_default_initial_patch_state, to='patchwork.State'),
+            preserve_default=True,
+        ),
         migrations.AddField(
             model_name='patchtag',
             name='patch',
-- 
2.5.0



More information about the Patchwork mailing list