diff --git a/apps/calendar/migrations/0001_initial.py b/apps/calendar/migrations/0001_initial.py index c6190f94..e1e3e6a8 100644 --- a/apps/calendar/migrations/0001_initial.py +++ b/apps/calendar/migrations/0001_initial.py @@ -1,8 +1,7 @@ -# Generated by Django 4.2.6 on 2023-11-16 15:42 +# Generated by Django 4.2.3 on 2024-01-03 07:17 import datetime -import django.db.models.deletion import django.utils.timezone from django.db import migrations, models @@ -14,11 +13,43 @@ class Migration(migrations.Migration): operations = [ migrations.CreateModel( - name="Calendar", + name="Tag", fields=[ ( "id", - models.BigAutoField( + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "ko_name", + models.CharField(max_length=255, unique=True, verbose_name="한글 이름"), + ), + ( + "en_name", + models.CharField(max_length=255, unique=True, verbose_name="영어 이름"), + ), + ( + "color", + models.CharField( + default="#000000", max_length=7, verbose_name="HEX 코드" + ), + ), + ], + options={ + "verbose_name": "태그", + "verbose_name_plural": "태그 목록", + }, + ), + migrations.CreateModel( + name="Event", + fields=[ + ( + "id", + models.AutoField( auto_created=True, primary_key=True, serialize=False, @@ -49,70 +80,45 @@ class Migration(migrations.Migration): verbose_name="삭제 시간", ), ), - ("is_allday", models.BooleanField(default=False, verbose_name="하루종일")), - ( - "start_at", - models.DateTimeField( - blank=True, default=None, null=True, verbose_name="시작 시간" - ), - ), ( - "end_at", - models.DateTimeField( - blank=True, default=None, null=True, verbose_name="종료 시간" - ), + "is_all_day", + models.BooleanField(default=False, verbose_name="하루 종일"), ), + ("start_at", models.DateTimeField(verbose_name="시작 시각")), + ("end_at", models.DateTimeField(verbose_name="종료 시각")), ("ko_title", models.CharField(max_length=512, verbose_name="한글 제목")), ("en_title", models.CharField(max_length=512, verbose_name="영어 제목")), ( "ko_description", - models.CharField(max_length=512, verbose_name="한글 설명"), + models.TextField( + blank=True, max_length=512, null=True, verbose_name="한글 설명" + ), ), ( "en_description", - models.CharField(max_length=512, verbose_name="영어 설명"), - ), - ("location", models.CharField(max_length=512, verbose_name="위치")), - ( - "url", - models.URLField( - blank=True, default=None, null=True, verbose_name="포탈 링크" + models.TextField( + blank=True, max_length=512, null=True, verbose_name="영어 설명" ), ), - ], - options={ - "ordering": ("-created_at",), - "abstract": False, - }, - ), - migrations.CreateModel( - name="Tag", - fields=[ ( - "id", - models.BigAutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", + "location", + models.CharField( + blank=True, max_length=512, null=True, verbose_name="장소" ), ), - ("name", models.CharField(max_length=255, unique=True)), - ("color", models.CharField(default="#000000", max_length=7)), + ("url", models.URLField(blank=True, null=True, verbose_name="URL")), ( - "calendar", - models.ForeignKey( - blank=True, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="calendar.calendar", + "tags", + models.ManyToManyField( + blank=True, to="calendar.tag", verbose_name="태그" ), ), ], - ), - migrations.AddField( - model_name="calendar", - name="tags", - field=models.ManyToManyField(related_name="calendars", to="calendar.tag"), + options={ + "verbose_name": "일정", + "verbose_name_plural": "일정 목록", + "ordering": ("-created_at",), + "abstract": False, + }, ), ] diff --git a/apps/calendar/migrations/0002_alter_calendar_id_alter_tag_id.py b/apps/calendar/migrations/0002_alter_calendar_id_alter_tag_id.py deleted file mode 100644 index 2d0e25e9..00000000 --- a/apps/calendar/migrations/0002_alter_calendar_id_alter_tag_id.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 4.2.6 on 2023-11-16 15:46 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("calendar", "0001_initial"), - ] - - operations = [ - migrations.AlterField( - model_name="calendar", - name="id", - field=models.AutoField( - auto_created=True, primary_key=True, serialize=False, verbose_name="ID" - ), - ), - migrations.AlterField( - model_name="tag", - name="id", - field=models.AutoField( - auto_created=True, primary_key=True, serialize=False, verbose_name="ID" - ), - ), - ]