diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-07-22 18:03:46 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-07-22 18:03:46 +0200 | 
| commit | 9209cb292ec92e3b09ec5658542fcff367657bcd (patch) | |
| tree | bdb0c08ba9f6e633214e3e4ac5d3b8b2d86895cf | |
| parent | 3d51395d392a5e3d38201e8c01b17bc15cdb6d1c (diff) | |
database: stations: make 'ds100' column optional.
HAFAS stations do not necessarily have ds100 codes
| -rw-r--r-- | lib/Travelynx/Command/database.pm | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index a47f2ce..10732ec 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -1803,6 +1803,18 @@ my @migrations = (  			}  		);  	}, + +	# v44 -> v45 +	# prepare for HAFAS support: many HAFAS stations do not have DS100 codes +	sub { +		my ($db) = @_; +		$db->query( +			qq{ +				alter table stations alter column ds100 drop not null; +				update schema_version set version = 45; +			} +		); +	},  );  # TODO add 'hafas' column to in_transit (and maybe journeys? undo/redo needs something to work with...) | 
