lemoncurry/users/migrations/0004_auto_20171023_0143.py

56 lines
1.8 KiB
Python
Raw Permalink Normal View History

2017-10-22 21:59:10 -04:00
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-23 01:43
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0003_key'),
]
operations = [
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=100)),
('display_name', models.CharField(blank=True, max_length=100)),
],
options={
'ordering': ('site', 'username'),
},
),
migrations.CreateModel(
name='Site',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100, unique=True)),
('icon', models.CharField(max_length=100)),
('url', models.CharField(max_length=100)),
],
options={
'ordering': ('name',),
},
),
migrations.AddField(
model_name='profile',
name='site',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Site'),
),
migrations.AddField(
model_name='profile',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='user',
name='profiles',
field=models.ManyToManyField(through='users.Profile', to='users.Site'),
),
]