diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-07-18 16:11:19 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-07-18 16:11:19 +0200 |
commit | 814cb4a4dd4017606829ecc6b6c70822bf52a30e (patch) | |
tree | 41ff682b2e7327b21060f62eab863681af431fc2 /lib/Travelynx/Command/database.pm | |
parent | 731b789855914cb94ec091604e32aa68a678404a (diff) |
Add list of preferred languages to user settings
Diffstat (limited to 'lib/Travelynx/Command/database.pm')
-rw-r--r-- | lib/Travelynx/Command/database.pm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index 34efde6..009da30 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -3359,6 +3359,28 @@ qq{select distinct checkout_station_id from in_transit where backend_id = 0;} } ); }, + + # v66 -> v67 + # Add language settings to profile + sub { + my ($db) = @_; + $db->query( + qq{ + drop view users_with_backend; + alter table users add column language varchar(128); + update schema_version set version = 67; + create view users_with_backend as select + users.id as id, users.name as name, status, public_level, + language, email, password, registered_at, last_seen, + deletion_requested, deletion_notified, use_history, + accept_follows, notifications, profile, backend_id, iris, + hafas, efa, dbris, motis, backend.name as backend_name + from users + left join backends as backend on users.backend_id = backend.id + ; + } + ); + }, ); sub sync_stations { |