mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-07 16:27:26 +08:00
[Enhance][Bug fix] Add log db & log bug
- Add a log database to record all playing scores - Fix a bug that if an exception is raised before flask app runs, logger will not work well.
This commit is contained in:
25
latest version/database/init/log_tables.sql
Normal file
25
latest version/database/init/log_tables.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
create table if not exists cache(key text primary key,
|
||||
value text,
|
||||
expire_time int
|
||||
);
|
||||
create table if not exists user_score(user_id int,
|
||||
song_id text,
|
||||
difficulty int,
|
||||
time_played int,
|
||||
score int,
|
||||
shiny_perfect_count int,
|
||||
perfect_count int,
|
||||
near_count int,
|
||||
miss_count int,
|
||||
health int,
|
||||
modifier int,
|
||||
clear_type int,
|
||||
rating real,
|
||||
primary key(user_id, song_id, difficulty, time_played)
|
||||
);
|
||||
|
||||
create index if not exists user_score_1 on user_score (song_id, difficulty);
|
||||
create index if not exists user_score_2 on user_score (time_played);
|
||||
|
||||
PRAGMA journal_mode = WAL;
|
||||
PRAGMA default_cache_size = 4000;
|
||||
Reference in New Issue
Block a user