You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
3.6 KiB

  1. # Generated by Django 3.2.8 on 2021-10-15 16:56
  2. import datetime
  3. from django.conf import settings
  4. from django.db import migrations, models
  5. import django.db.models.deletion
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='Address',
  14. fields=[
  15. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  16. ('title', models.CharField(max_length=100)),
  17. ('street1', models.CharField(max_length=50)),
  18. ('street2', models.CharField(blank=True, max_length=50)),
  19. ('postalcode', models.CharField(max_length=10)),
  20. ('city', models.CharField(max_length=100)),
  21. ('state', models.CharField(max_length=50)),
  22. ('country', models.CharField(max_length=50)),
  23. ('owner', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  24. ],
  25. ),
  26. migrations.CreateModel(
  27. name='Image',
  28. fields=[
  29. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  30. ('photo', models.ImageField(default='avatar.png', upload_to='avatars/')),
  31. ('description', models.CharField(blank=True, max_length=100)),
  32. ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  33. ],
  34. ),
  35. migrations.CreateModel(
  36. name='Profile',
  37. fields=[
  38. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  39. ('first_name', models.CharField(blank=True, max_length=50)),
  40. ('last_name', models.CharField(blank=True, max_length=50)),
  41. ('gender', models.CharField(choices=[('m', 'Male'), ('f', 'Female')], default='m', max_length=1)),
  42. ('birthdate', models.DateField(default=datetime.date(2021, 10, 15))),
  43. ('companyname', models.CharField(blank=True, max_length=200)),
  44. ('bio', models.TextField(blank=True, default='no bio ...', max_length=300)),
  45. ('country', models.CharField(blank=True, max_length=50)),
  46. ('updated', models.DateTimeField(auto_now=True)),
  47. ('created', models.DateTimeField(auto_now_add=True)),
  48. ('type', models.CharField(choices=[('pers', 'personal'), ('prof', 'professional'), ('asso', 'association')], max_length=4)),
  49. ('tel', models.CharField(blank=True, max_length=50)),
  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)),
  51. ('activated', models.BooleanField(default=False)),
  52. ('avatar', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app1.image')),
  53. ('defaddr', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='app1.address')),
  54. ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  55. ],
  56. ),
  57. ]

Powered by TurnKey Linux.