2016-11-19 16:19:00 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
from django.conf import settings
|
2019-10-05 22:32:54 +00:00
|
|
|
import django.db.models.deletion
|
2016-11-19 16:19:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2018-10-04 19:29:19 +00:00
|
|
|
("sas", "0001_initial"),
|
2016-11-19 16:19:00 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2018-10-04 19:29:19 +00:00
|
|
|
name="PeoplePictureRelation",
|
2016-11-19 16:19:00 +00:00
|
|
|
fields=[
|
2018-10-04 19:29:19 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
primary_key=True,
|
|
|
|
verbose_name="ID",
|
|
|
|
auto_created=True,
|
|
|
|
serialize=False,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"picture",
|
|
|
|
models.ForeignKey(
|
2019-10-05 22:32:54 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
related_name="people",
|
|
|
|
to="sas.Picture",
|
|
|
|
verbose_name="picture",
|
2018-10-04 19:29:19 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"user",
|
|
|
|
models.ForeignKey(
|
2019-10-05 22:32:54 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2018-10-04 19:29:19 +00:00
|
|
|
related_name="pictures",
|
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
verbose_name="user",
|
|
|
|
),
|
|
|
|
),
|
2016-11-19 16:19:00 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.AlterUniqueTogether(
|
2018-10-04 19:29:19 +00:00
|
|
|
name="peoplepicturerelation", unique_together=set([("user", "picture")])
|
2016-11-19 16:19:00 +00:00
|
|
|
),
|
|
|
|
]
|