devicehub-django/user/migrations/0001_initial.py

118 lines
3.7 KiB
Python
Raw Permalink Normal View History

2024-09-17 15:28:14 +00:00
# Generated by Django 5.0.6 on 2024-09-17 15:21
2024-06-12 07:32:49 +00:00
2024-09-17 15:28:14 +00:00
import django.db.models.deletion
2024-06-12 07:32:49 +00:00
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
2024-09-17 15:28:14 +00:00
migrations.CreateModel(
name="Institution",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"name",
models.CharField(max_length=255, unique=True, verbose_name="Name"),
),
(
"logo",
models.CharField(
blank=True, max_length=255, null=True, verbose_name="Logo"
),
),
(
"location",
models.CharField(
blank=True, max_length=255, null=True, verbose_name="Location"
),
),
(
"responsable_person",
models.CharField(
blank=True,
max_length=255,
null=True,
verbose_name="Responsable",
),
),
(
"supervisor_person",
models.CharField(
blank=True, max_length=255, null=True, verbose_name="Supervisor"
),
),
],
),
2024-06-12 07:32:49 +00:00
migrations.CreateModel(
name="User",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("password", models.CharField(max_length=128, verbose_name="password")),
(
"last_login",
models.DateTimeField(
blank=True, null=True, verbose_name="last login"
),
),
(
"email",
models.EmailField(
max_length=255, unique=True, verbose_name="Email address"
),
),
(
"is_active",
models.BooleanField(default=True, verbose_name="is active"),
),
(
"is_admin",
models.BooleanField(default=False, verbose_name="is admin"),
),
(
"first_name",
models.CharField(
blank=True, max_length=255, null=True, verbose_name="First name"
),
),
(
"last_name",
models.CharField(
blank=True, max_length=255, null=True, verbose_name="Last name"
),
),
("accept_gdpr", models.BooleanField(default=False)),
2024-09-17 15:28:14 +00:00
(
"institution",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="user.institution",
),
),
2024-06-12 07:32:49 +00:00
],
options={
"abstract": False,
},
),
]