Convert Location to Location2025

This commit is contained in:
2025-08-30 02:20:25 +09:00
parent 48b09b08da
commit 9af1e03523
10 changed files with 92 additions and 93 deletions

View File

@ -6,7 +6,7 @@ from django.db import transaction, connections
from django.utils import timezone
from django.conf import settings
from django.contrib.auth import get_user_model
from rog.models import Member, Team, NewEvent2, Entry, Location,NewCategory #, GpsLog
from rog.models import Member, Team, NewEvent2, Entry, Location2025,NewCategory #, GpsLog
CustomUser = get_user_model()
logger = logging.getLogger(__name__)
@ -473,7 +473,7 @@ class Command(BaseCommand):
# 4. Locationテーブルからcheckpoint_tableへの転送
self.stdout.write('checkpointデータを転送中...')
locations = Location.objects.filter(group=event.event_name)
locations = Location2025.objects.filter(group=event.event_name)
# Print the number of location records
location_count = locations.count()
self.stdout.write(f'checkpointデータ: {location_count}件を転送中...')
@ -568,7 +568,7 @@ class Command(BaseCommand):
try:
# 4. Locationテーブルからcheckpoint_tableへの転送
self.stdout.write('checkpointデータを転送中...')
locations = Location.objects.filter(event=event)
locations = Location2025.objects.filter(event_id=event.id)
for location in locations:
cursor.execute("""