Projet

Général

Profil

0005-notifications-add-origin-to-unique-index-to-be-rebas.patch

Benjamin Dauvergne, 16 mars 2018 15:24

Télécharger (1,99 ko)

Voir les différences:

Subject: [PATCH 5/7] notifications: add origin to unique index (to be rebased)

 .../{0004_auto_20180316_1026.py => 0004_auto_20180316_1337.py}        | 4 ++--
 combo/apps/notifications/models.py                                    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
 rename combo/apps/notifications/migrations/{0004_auto_20180316_1026.py => 0004_auto_20180316_1337.py} (78%)
combo/apps/notifications/migrations/0004_auto_20180316_1026.py → combo/apps/notifications/migrations/0004_auto_20180316_1337.py
1 1
# -*- coding: utf-8 -*-
2
# Generated by Django 1.11.11 on 2018-03-16 10:26
2
# Generated by Django 1.11.11 on 2018-03-16 13:37
3 3
from __future__ import unicode_literals
4 4

  
5 5
from django.conf import settings
......
16 16
    operations = [
17 17
        migrations.AlterUniqueTogether(
18 18
            name='notification',
19
            unique_together=set([('user', 'external_id')]),
19
            unique_together=set([('user', 'origin', 'external_id')]),
20 20
        ),
21 21
    ]
combo/apps/notifications/models.py
71 71
    class Meta:
72 72
        verbose_name = _('Notification')
73 73
        unique_together = (
74
            ('user', 'external_id'),
74
            ('user', 'origin', 'external_id'),
75 75
        )
76 76

  
77 77
    def __unicode__(self):
78
-