add location migrate

This commit is contained in:
2025-08-30 03:48:07 +09:00
parent cf0adb34f9
commit 596b7313dd
11 changed files with 1021 additions and 3 deletions

View File

@ -1091,6 +1091,8 @@ class Location2025(models.Model):
cp_number = models.IntegerField(_('CP番号'), db_index=True)
event = models.ForeignKey('NewEvent2', on_delete=models.CASCADE, verbose_name=_('イベント'))
cp_name = models.CharField(_('CP名'), max_length=255)
sub_loc_id = models.CharField(_('サブロケーションID'), max_length=2048, blank=True, null=True)
subcategory = models.CharField(_('サブカテゴリ'), max_length=2048, blank=True, null=True)
# 位置情報
latitude = models.FloatField(_('緯度'), null=True, blank=True)
@ -1117,6 +1119,14 @@ class Location2025(models.Model):
website = models.URLField(_('ウェブサイト'), blank=True, null=True)
description = models.TextField(_('説明'), blank=True, null=True)
# 追加フィールドLocationテーブルから移行
photos = models.CharField(_('写真'), max_length=2048, blank=True, null=True)
videos = models.CharField(_('動画'), max_length=2048, blank=True, null=True)
remark = models.TextField(_('備考'), blank=True, null=True)
tags = models.CharField(_('タグ'), max_length=2048, blank=True, null=True)
evaluation_value = models.CharField(_('評価値'), max_length=255, blank=True, null=True)
hidden_location = models.BooleanField(_('隠しロケーション'), default=False)
# 管理情報
is_active = models.BooleanField(_('有効'), default=True, db_index=True)
sort_order = models.IntegerField(_('表示順'), default=0)