modify event_id as integer on GpsCheckin

This commit is contained in:
2024-11-10 16:32:49 +09:00
parent 0abfd6cdb6
commit 18f3370f29
2 changed files with 3 additions and 2 deletions

View File

@ -547,7 +547,7 @@ class GpsCheckin(models.Model):
null=False, null=False,
help_text="ゼッケン番号" help_text="ゼッケン番号"
) )
event_id = models.TextField( event_id = models.IntegerField(
null=True, null=True,
blank=True, blank=True,
help_text="イベントID" help_text="イベントID"

View File

@ -6,6 +6,7 @@ DROP VIEW IF EXISTS v_checkin_summary CASCADE;
-- チェックポイントの集計用ビュー -- チェックポイントの集計用ビュー
CREATE VIEW v_checkin_summary AS CREATE VIEW v_checkin_summary AS
SELECT SELECT
event_id,
event_code, event_code,
zekken_number, -- 文字列として保持 zekken_number, -- 文字列として保持
COUNT(*) as total_checkins, COUNT(*) as total_checkins,
@ -18,7 +19,7 @@ SELECT
FROM FROM
gps_checkins gps_checkins
GROUP BY GROUP BY
event_code, zekken_number; event_id,event_code, zekken_number;
-- カテゴリー内ランキング計算用ビュー -- カテゴリー内ランキング計算用ビュー
CREATE VIEW v_category_rankings AS CREATE VIEW v_category_rankings AS