|
|
- # Generated by Django 3.2.8 on 2021-10-15 16:56
-
- import datetime
- from django.conf import settings
- from django.db import migrations, models
- import django.db.models.deletion
-
-
- class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Address',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=100)),
- ('street1', models.CharField(max_length=50)),
- ('street2', models.CharField(blank=True, max_length=50)),
- ('postalcode', models.CharField(max_length=10)),
- ('city', models.CharField(max_length=100)),
- ('state', models.CharField(max_length=50)),
- ('country', models.CharField(max_length=50)),
- ('owner', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- ),
- migrations.CreateModel(
- name='Image',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('photo', models.ImageField(default='avatar.png', upload_to='avatars/')),
- ('description', models.CharField(blank=True, max_length=100)),
- ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- ),
- migrations.CreateModel(
- name='Profile',
- fields=[
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('first_name', models.CharField(blank=True, max_length=50)),
- ('last_name', models.CharField(blank=True, max_length=50)),
- ('gender', models.CharField(choices=[('m', 'Male'), ('f', 'Female')], default='m', max_length=1)),
- ('birthdate', models.DateField(default=datetime.date(2021, 10, 15))),
- ('companyname', models.CharField(blank=True, max_length=200)),
- ('bio', models.TextField(blank=True, default='no bio ...', max_length=300)),
- ('country', models.CharField(blank=True, max_length=50)),
- ('updated', models.DateTimeField(auto_now=True)),
- ('created', models.DateTimeField(auto_now_add=True)),
- ('type', models.CharField(choices=[('pers', 'personal'), ('prof', 'professional'), ('asso', 'association')], max_length=4)),
- ('tel', models.CharField(blank=True, max_length=50)),
- ('sex', models.IntegerField(blank=True, choices=[(0, 'exclusively heterosexual'), (1, 'Heterosexual predominance'), (2, 'Predominantly heterosexual, occasionally homosexual'), (3, 'Bisexual without preference'), (4, 'Predominantly homosexual, occasionally heterosexual'), (5, 'Homosexual predominance'), (6, 'exclusively homosexual')], null=True)),
- ('activated', models.BooleanField(default=False)),
- ('avatar', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app1.image')),
- ('defaddr', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='app1.address')),
- ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ],
- ),
- ]
|