Files
postgres-web/pgweb/contributors/migrations/0001_initial.py
Magnus Hagander a8500c3853 Add migrations for all existing models
When migrating on existing installations, run the

python manage.py migrate --fake-initial

command.
2016-05-14 19:49:12 +02:00

55 lines
2.1 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Contributor',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('lastname', models.CharField(max_length=100)),
('firstname', models.CharField(max_length=100)),
('email', models.EmailField(max_length=254)),
('company', models.CharField(max_length=100, null=True, blank=True)),
('companyurl', models.URLField(max_length=100, null=True, verbose_name=b'Company URL', blank=True)),
('location', models.CharField(max_length=100, null=True, blank=True)),
('contribution', models.TextField(null=True, blank=True)),
],
options={
'ordering': ('lastname', 'firstname'),
},
),
migrations.CreateModel(
name='ContributorType',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('typename', models.CharField(max_length=32)),
('sortorder', models.IntegerField(default=100)),
('extrainfo', models.TextField(null=True, blank=True)),
('detailed', models.BooleanField(default=True)),
],
options={
'ordering': ('sortorder',),
},
),
migrations.AddField(
model_name='contributor',
name='ctype',
field=models.ForeignKey(to='contributors.ContributorType'),
),
migrations.AddField(
model_name='contributor',
name='user',
field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True),
),
]