mirror of
https://github.com/norohind/jubilant-system.git
synced 2025-06-12 20:42:06 +03:00
Fix squads_view don't showing proper inserted_timestamp
This commit is contained in:
parent
0beb0216c3
commit
013c39426b
@ -39,13 +39,42 @@ inserted_timestamp datetime default current_timestamp);
|
|||||||
|
|
||||||
create view if not exists squads_view
|
create view if not exists squads_view
|
||||||
as
|
as
|
||||||
select *
|
select squad_id,
|
||||||
from squads_states
|
name,
|
||||||
where inserted_timestamp in (
|
tag,
|
||||||
select max(inserted_timestamp)
|
owner_name,
|
||||||
from squads_states
|
owner_id,
|
||||||
group by squad_id) and tag is not null
|
platform,
|
||||||
group by squad_id;
|
created,
|
||||||
|
created_ts,
|
||||||
|
accepting_new_members,
|
||||||
|
power_id,
|
||||||
|
power_name,
|
||||||
|
super_power_id,
|
||||||
|
super_power_name,
|
||||||
|
faction_id,
|
||||||
|
faction_name,
|
||||||
|
user_tags,
|
||||||
|
member_count,
|
||||||
|
pending_count,
|
||||||
|
full,
|
||||||
|
public_comms,
|
||||||
|
public_comms_override,
|
||||||
|
public_comms_available,
|
||||||
|
current_season_trade_score,
|
||||||
|
previous_season_trade_score,
|
||||||
|
current_season_combat_score,
|
||||||
|
previous_season_combat_score,
|
||||||
|
current_season_exploration_score,
|
||||||
|
previous_season_exploration_score,
|
||||||
|
current_season_cqc_score,
|
||||||
|
previous_season_cqc_score,
|
||||||
|
current_season_bgs_score,
|
||||||
|
previous_season_bgs_score,
|
||||||
|
current_season_powerplay_score,
|
||||||
|
previous_season_powerplay_score,
|
||||||
|
current_season_aegis_score,
|
||||||
|
previous_season_aegis_score, max(inserted_timestamp) as inserted_timestamp from squads_states group by squad_id having tag is not null;
|
||||||
|
|
||||||
create table if not exists news (
|
create table if not exists news (
|
||||||
squad_id int,
|
squad_id int,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user