123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- # Generated by Django 4.0.4 on 2022-04-18 12:32
- import colorfield.fields
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ]
- operations = [
- migrations.CreateModel(
- name='Group',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=255)),
- ('color', colorfield.fields.ColorField(default='#fb35e8', image_field=None, max_length=18, samples=None)),
- ],
- ),
- migrations.CreateModel(
- name='Person',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=255)),
- ('birth_date', models.DateField(blank=True, null=True)),
- ('birth_town', models.CharField(blank=True, max_length=255, null=True)),
- ('death_date', models.DateField(blank=True, null=True)),
- ('death_town', models.CharField(blank=True, max_length=255, null=True)),
- ('comment', models.TextField(blank=True, null=True)),
- ('image', models.ImageField(blank=True, null=True, upload_to='stammbaum/images')),
- ('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='stammbaum.group')),
- ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='parent_map', to='stammbaum.person')),
- ],
- options={
- 'permissions': [('view', 'Can view Stammbaum'), ('upload_image', 'Can upload images')],
- },
- ),
- migrations.CreateModel(
- name='Pair',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('color', colorfield.fields.ColorField(default='#c37768', image_field=None, max_length=18, samples=None)),
- ('person1', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='person1', to='stammbaum.person')),
- ('person2', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='person2', to='stammbaum.person')),
- ],
- ),
- ]
|