guild-journal/guild/migrations/0002_resource_alter_player_...

76 lines
2.3 KiB
Python

# Generated by Django 4.2.1 on 2023-06-11 18:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("guild", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="Resource",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
("description", models.TextField()),
],
options={
"verbose_name": "resource",
"verbose_name_plural": "resources",
},
),
migrations.AlterField(
model_name="player",
name="name",
field=models.CharField(max_length=255, unique=True),
),
migrations.CreateModel(
name="ResourceEarned",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("amount", models.IntegerField()),
(
"character",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
to="guild.character",
verbose_name="character",
),
),
(
"resource",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="guild.resource",
verbose_name="resource",
),
),
],
options={
"verbose_name": "resourceearned",
"verbose_name_plural": "resourceearneds",
},
),
]