fix(db): give clipped trips their days back and let road-trip day numbers follow the trip limit

Two boot migrations. The first appends the missing dated days to a trip
the old 365-day cap clipped, only where the dated days still run unbroken
from the start date, so a trip that was re-dated by hand or lost a day in
the middle is left alone; dateless days that hold content stay behind the
dated ones as generateDays keeps them. The second rebuilds
roadtrip_day_boundaries without the CHECK that held day_number to 366,
which would have refused a boundary on a later day of a longer trip.

The road-trip contracts follow the same limit: the day boundary and
corridor schemas, the set_day_boundary tool and the day window's runaway
guard read MAX_TRIP_DAYS instead of their own 365 or 366, and the
tooLong message carries the number as a placeholder in all 23 locales.
This commit is contained in:
Maurice
2026-09-20 12:09:00 +02:00
parent c8d4ed896e
commit 62cccf32f3
34 changed files with 295 additions and 35 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ const roadtrip: TranslationStrings = {
'roadtrip.window.incomplete': '毎日の休憩を計算するには、すべての接続ルートが必要です。',
'roadtrip.window.conflict':
'固定時刻が移動や休憩と両立しません。手動の時刻は保持され、自動計画は一時停止しています。',
'roadtrip.window.tooLong': 'この設定では365日を超える追加日数が必要です。一日の移動時間を長くしてください。',
'roadtrip.window.tooLong': 'この設定では{days}日を超える追加日数が必要です。一日の移動時間を長くしてください。',
'roadtrip.mode.roadtrip': 'ロードトリップ',
'roadtrip.mode.days': '日ごと',
'roadtrip.mode.label': 'プラン表示',