diff --git a/app/Enum/TripSource.php b/app/Enum/TripSource.php new file mode 100644 index 000000000..6e705d19f --- /dev/null +++ b/app/Enum/TripSource.php @@ -0,0 +1,17 @@ + UTCDateTime::class, 'arrival' => UTCDateTime::class, 'last_refreshed' => 'datetime', + 'source' => TripSource::class, ]; public function polyline(): HasOne { diff --git a/database/migrations/2023_11_22_000000_add_source_to_trips.php b/database/migrations/2023_11_22_000000_add_source_to_trips.php new file mode 100644 index 000000000..da0640c2a --- /dev/null +++ b/database/migrations/2023_11_22_000000_add_source_to_trips.php @@ -0,0 +1,23 @@ +string('source') + ->default('hafas') + ->after('delay'); + }); + } + + public function down(): void { + Schema::table('hafas_trips', static function(Blueprint $table) { + $table->dropColumn('source'); + }); + } +};