<filename>src/applications/profile/migrations/0001_initial.py<gh_stars>0
# Generated by Django 3.1.6 on 2021-02-25 15:31

import datetime

import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="Profile",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(default=datetime.datetime.now)),
                (
                    "avatar",
                    models.ImageField(
                        blank=True, default="default_user.png", null=True, upload_to=""
                    ),
                ),
                ("first_name", models.CharField(default="name", max_length=30)),
                ("last_name", models.CharField(default="last_name", max_length=30)),
                ("sity", models.CharField(default="", max_length=30, null=True)),
                ("phone", models.CharField(default="", max_length=20, null=True)),
                ("needed_help", models.TextField(default="")),
                ("provide_help", models.TextField(default="")),
                ("active", models.BooleanField(default=False)),
                ("about", models.TextField(blank=True, default="", null=True)),
                (
                    "contacts",
                    models.ManyToManyField(
                        related_name="_profile_contacts_+", to="profile.Profile"
                    ),
                ),
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="TemporaryProfile",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("needed_help", models.TextField(default="")),
                ("provide_help", models.TextField(default="")),
                (
                    "profile",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="copy",
                        to="profile.profile",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Rating",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("value", models.FloatField(default=0)),
                (
                    "profile",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="profile.profile",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Feedback",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("content", models.TextField(default="content")),
                ("created_at", models.DateTimeField(default=datetime.datetime.now)),
                ("rating_value", models.IntegerField(default=0)),
                (
                    "author",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "rating",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="profile.rating"
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
    ]

<filename>src/applications/profile/migrations/0001_initial.py<gh_stars>0
# Generated by Django 3.1.6 on 2021-02-25 15:31

import datetime

import django.db.models.deletion
from django.conf import settings
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="Profile",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(default=datetime.datetime.now)),
                (
                    "avatar",
                    models.ImageField(
                        blank=True, default="default_user.png", null=True, upload_to=""
                    ),
                ),
                ("first_name", models.CharField(default="name", max_length=30)),
                ("last_name", models.CharField(default="last_name", max_length=30)),
                ("sity", models.CharField(default="", max_length=30, null=True)),
                ("phone", models.CharField(default="", max_length=20, null=True)),
                ("needed_help", models.TextField(default="")),
                ("provide_help", models.TextField(default="")),
                ("active", models.BooleanField(default=False)),
                ("about", models.TextField(blank=True, default="", null=True)),
                (
                    "contacts",
                    models.ManyToManyField(
                        related_name="_profile_contacts_+", to="profile.Profile"
                    ),
                ),
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="TemporaryProfile",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("needed_help", models.TextField(default="")),
                ("provide_help", models.TextField(default="")),
                (
                    "profile",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="copy",
                        to="profile.profile",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Rating",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("value", models.FloatField(default=0)),
                (
                    "profile",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="profile.profile",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Feedback",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("content", models.TextField(default="content")),
                ("created_at", models.DateTimeField(default=datetime.datetime.now)),
                ("rating_value", models.IntegerField(default=0)),
                (
                    "author",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "rating",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="profile.rating"
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
    ]

# Generated by Django 3.1.6 on 2021-02-25 15:31