gitlab bot: make project_id unique=True
This commit is contained in:
parent
e846502b48
commit
1a428e7d29
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('gitlab_bot', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='gitlabprojectconfig',
|
||||
name='project_id',
|
||||
field=models.CharField(unique=True, max_length=64),
|
||||
),
|
||||
]
|
|
@ -24,7 +24,7 @@ class GitlabProjectConfig(models.Model):
|
|||
"""Maintain settings for a particular project in GitLab."""
|
||||
|
||||
gitlab_config = models.ForeignKey('GitlabConfig', null=True)
|
||||
project_id = models.CharField(max_length=64)
|
||||
project_id = models.CharField(max_length=64, unique=True)
|
||||
|
||||
manage_merge_request_code_reviews = models.BooleanField(default=False)
|
||||
code_reviews_necessary = models.PositiveSmallIntegerField(default=0)
|
||||
|
|
Loading…
Reference in New Issue