diff --git a/PluralKit.Core/Database/Views/views.sql b/PluralKit.Core/Database/Views/views.sql index f936eaf2..d2373b64 100644 --- a/PluralKit.Core/Database/Views/views.sql +++ b/PluralKit.Core/Database/Views/views.sql @@ -7,25 +7,6 @@ select systems.id as system, from systems inner join lateral (select * from switches where switches.system = systems.id order by timestamp desc limit 1) as last_switch on true; --- Returns one row for every current fronter in a system, w/ some member info -create view system_fronters as -select - systems.id as system_id, - last_switch.id as switch_id, - last_switch.timestamp as switch_timestamp, - members.id as member_id, - members.hid as member_hid, - members.name as member_name -from systems - -- TODO: is there a more efficient way of doing this search? might need to index on timestamp if we haven't in prod - inner join lateral (select * from switches where switches.system = systems.id order by timestamp desc limit 1) as last_switch on true - - -- change to left join to handle memberless switches? - inner join switch_members on switch_members.switch = last_switch.system - inner join members on members.id = switch_members.member --- return them in order of the switch itself -order by switch_members.id; - create view member_list as select members.*, -- Find last message ID diff --git a/PluralKit.Core/Database/clean.sql b/PluralKit.Core/Database/clean.sql index 6badec2c..5e407a21 100644 --- a/PluralKit.Core/Database/clean.sql +++ b/PluralKit.Core/Database/clean.sql @@ -3,7 +3,6 @@ -- This does mean we can't use any functions in row triggers, etc. Still unsure how to handle this. drop view if exists system_last_switch; -drop view if exists system_fronters; drop view if exists member_list; drop view if exists group_list;