1
0
GameServerSupervisor/gameserver/migrations/0001_initial.py
Pratyush Desai 1c097640a7
Add base models for testing
Attempt to figure out the necessary data models
and applicable fields.

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2024-12-20 15:01:01 +05:30

95 lines
2.9 KiB
Python

# Generated by Django 5.1.4 on 2024-12-20 09:11
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Game",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
("friendly_name", models.CharField(max_length=255)),
("command_line", models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name="Mod",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
("friendly_name", models.CharField(max_length=255)),
("command_line", models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name="Player",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
("score", models.IntegerField()),
],
),
migrations.CreateModel(
name="Server",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("port", models.IntegerField()),
("game_type", models.CharField(max_length=255)),
(
"game",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="gameserver.game",
),
),
(
"mod",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="gameserver.mod"
),
),
("players", models.ManyToManyField(to="gameserver.player")),
],
),
]