mirror of
https://codeberg.org/icewind/log-normalizer.git
synced 2026-06-03 22:04:05 +02:00
better clean map
This commit is contained in:
parent
3f67947052
commit
687ff82c19
1 changed files with 4 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ CREATE TYPE event_type AS ENUM ('charge', 'pointcap', 'medic_death', 'round_win'
|
|||
CREATE TYPE medigun AS ENUM ('medigun', 'kritzkrieg', 'quickfix', 'vaccinator');
|
||||
|
||||
CREATE FUNCTION clean_map_name(map TEXT) RETURNS TEXT AS $$
|
||||
SELECT regexp_replace(map, '(_(a|b|beta|u|r|v|rc|final|comptf|ugc)?[0-9]*[a-z]?$)|([0-9]+[a-z]?$)', '', 'g');
|
||||
SELECT regexp_replace(map, '((_(a|b|beta|u|r|v|rc|final|comptf|ugc|nb)?[0-9]*){1,2}[a-z]?$)|([0-9]+[a-z]?$)', '', 'g');
|
||||
$$ LANGUAGE SQL IMMUTABLE;
|
||||
|
||||
CREATE TABLE logs (
|
||||
|
|
@ -256,6 +256,9 @@ CREATE INDEX players_clean_map_idx
|
|||
CREATE INDEX players_date_idx
|
||||
ON players USING BTREE (date);
|
||||
|
||||
CREATE INDEX players_year_idx
|
||||
ON players USING BTREE (extract(year from date));
|
||||
|
||||
CREATE TABLE class_stats (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
player_id BIGINT NOT NULL REFERENCES players(id),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue