NDOJ/judge/migrations/0138_bookmark_makebookmark.py

74 lines
2.2 KiB
Python
Raw Permalink Normal View History

2022-11-17 19:17:45 +00:00
# Generated by Django 3.2.16 on 2022-11-17 17:13
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
2022-11-17 22:11:47 +00:00
("judge", "0137_auto_20221116_2201"),
2022-11-17 19:17:45 +00:00
]
operations = [
migrations.CreateModel(
2022-11-17 22:11:47 +00:00
name="BookMark",
2022-11-17 19:17:45 +00:00
fields=[
2022-11-17 22:11:47 +00:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"page",
models.CharField(
db_index=True, max_length=30, verbose_name="associated page"
),
),
2022-11-17 19:17:45 +00:00
],
options={
2022-11-17 22:11:47 +00:00
"verbose_name": "bookmark",
"verbose_name_plural": "bookmarks",
2022-11-17 19:17:45 +00:00
},
),
migrations.CreateModel(
2022-11-17 22:11:47 +00:00
name="MakeBookMark",
2022-11-17 19:17:45 +00:00
fields=[
2022-11-17 22:11:47 +00:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"bookmark",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="bookmark",
to="judge.bookmark",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="user_bookmark",
to="judge.profile",
),
),
2022-11-17 19:17:45 +00:00
],
options={
2022-11-17 22:11:47 +00:00
"verbose_name": "make bookmark",
"verbose_name_plural": "make bookmarks",
"unique_together": {("user", "bookmark")},
2022-11-17 19:17:45 +00:00
},
),
]