add unique constraint to UserExternalId (#32833)
This commit is contained in:
parent
ac45c52f8a
commit
853140e8be
|
@ -0,0 +1,29 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-06-17 09:13
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('custom_user', '0016_auto_20180925_1107'),
|
||||
('authentic2', '0023_auto_20181031_0900'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='LDAPUser',
|
||||
fields=[
|
||||
],
|
||||
options={
|
||||
'proxy': True,
|
||||
},
|
||||
bases=('custom_user.user',),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='userexternalid',
|
||||
unique_together=set([('source', 'external_id')]),
|
||||
),
|
||||
]
|
|
@ -75,6 +75,9 @@ class UserExternalId(models.Model):
|
|||
class Meta:
|
||||
verbose_name = _('user external id')
|
||||
verbose_name_plural = _('user external ids')
|
||||
unique_together = [
|
||||
('source', 'external_id'),
|
||||
]
|
||||
|
||||
|
||||
@six.python_2_unicode_compatible
|
||||
|
|
Loading…
Reference in New Issue