Skip to content

Commit

Permalink
fixed schema #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniagui12 committed Sep 19, 2023
1 parent 6ab84c0 commit 130924e
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 0 deletions.
58 changes: 58 additions & 0 deletions event/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generated by Django 4.2 on 2023-09-19 04:49

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
("user", "0001_initial"),
("tag", "0001_initial"),
("link", "0001_initial"),
]

operations = [
migrations.CreateModel(
name="Event",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("image", models.CharField(max_length=50)),
("name", models.CharField(max_length=50)),
("place", models.CharField(max_length=50)),
("date", models.DateField()),
("description", models.CharField(max_length=50)),
("num_participants", models.IntegerField()),
(
"category",
models.CharField(
choices=[
("ACADEMIC", "Academic"),
("CULTURAL", "Cultural"),
("SPORTS", "Sports"),
("ENTERTAINMENT", "Entertainment"),
("OTHER", "Other"),
],
default="OTHER",
max_length=20,
),
),
("state", models.BooleanField(default=True)),
("duration", models.IntegerField()),
(
"creator",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="user.user"
),
),
("links", models.ManyToManyField(related_name="links", to="link.link")),
(
"participants",
models.ManyToManyField(related_name="participants", to="user.user"),
),
("tags", models.ManyToManyField(related_name="tags", to="tag.tag")),
],
),
]
Empty file added event/migrations/__init__.py
Empty file.
20 changes: 20 additions & 0 deletions link/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2 on 2023-09-19 04:49

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="Link",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("text", models.CharField(max_length=1000)),
],
),
]
Empty file added link/migrations/__init__.py
Empty file.
28 changes: 28 additions & 0 deletions tag/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.2 on 2023-09-19 04:49

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="Tag",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=50)),
],
),
]
Empty file added tag/migrations/__init__.py
Empty file.
97 changes: 97 additions & 0 deletions user/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Generated by Django 4.2 on 2023-09-19 04:49

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
("tag", "0001_initial"),
]

operations = [
migrations.CreateModel(
name="User",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("icon", models.CharField(max_length=50)),
("login", models.CharField(max_length=50)),
("name", models.CharField(max_length=50)),
("password", models.CharField(max_length=50)),
("email", models.CharField(max_length=50)),
("verificated", models.BooleanField(default=False)),
(
"role",
models.CharField(
choices=[
("STUDENT", "Students"),
("TEACHER", "Teacher"),
("ADMIN", "Admin"),
("UNIANDES", "Uniandes"),
],
default="STUDENT",
max_length=10,
),
),
(
"career",
models.CharField(
choices=[
("ADMINISTRACION", "Administracion"),
("ANTROPOLOGIA", "Antropologia"),
("ARQUITECTURA", "Arquitectura"),
("ARTE", "Arte"),
("BIOLOGIA", "Biologia"),
("CONTADURIA_INTERNACIONAL", "Contaduria Internacional"),
("DECANATURA_DE_ESTUDIANTES", "Decanatura De Estudiantes"),
("DEPORTES", "Deportes"),
("DERECHO", "Derecho"),
("DISENO", "Diseno"),
("ECONOMIA", "Economia"),
("EDUCACION", "Educacion"),
("FILOSOFIA", "Filosofia"),
("FISICA", "Fisica"),
("GEOCIENCIAS", "Geociencias"),
("ESCUELA_DE_GOBIERNO", "Escuela De Gobierno"),
("HISTORIA", "Historia"),
("HISTORIA_DEL_ARTE", "Historia Del Arte"),
("INGENIERIA_BIOMEDICA", "Ingenieria Biomedica"),
(
"INGENIERIA_CIVIL_Y_AMBIENTAL",
"Ingenieria Civil Y Ambiental",
),
("INGENIERIA_DE_ALIMENTOS", "Ingenieria De Alimentos"),
(
"INGENIERIA_DE_SISTEMAS_Y_COMPUTACION",
"Ingenieria De Sistemas Y Computacion",
),
(
"INGENIERIA_ELECTRICA_Y_ELECTRONICA",
"Ingenieria Electrica Y Electronica",
),
("INGENIERIA_INDUSTRIAL", "Ingenieria Industrial"),
("INGENIERIA_MECANICA", "Ingenieria Mecanica"),
("INGENIERIA_QUIMICA", "Ingenieria Quimica"),
("LENGUAS_Y_CULTURA", "Lenguas Y Cultura"),
("LITERATURA", "Literatura"),
("MATEMATICAS", "Matematicas"),
("MEDICINA", "Medicina"),
("MICROBIOLOGIA", "Microbiologia"),
("MUSICA", "Musica"),
("NARRATIVAS_DIGITALES", "Narrativas Digitales"),
("PSICOLOGIA", "Psicologia"),
("QUIMICA", "Quimica"),
("OTRO", "Otro"),
],
default="OTRO",
max_length=50,
),
),
("birthdate", models.DateField()),
("friends", models.ManyToManyField(blank=True, to="user.user")),
("tags", models.ManyToManyField(blank=True, to="tag.tag")),
],
),
]
Empty file added user/migrations/__init__.py
Empty file.

0 comments on commit 130924e

Please sign in to comment.