Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DB schema and insert data #54

Open
bananahampster opened this issue Dec 21, 2023 · 0 comments · May be fixed by #58
Open

Update DB schema and insert data #54

bananahampster opened this issue Dec 21, 2023 · 0 comments · May be fixed by #58

Comments

@bananahampster
Copy link
Owner

bananahampster commented Dec 21, 2023

Add DB insertion of individual events: change DB structure and insert into DB on parse.

On reparse, truncate event table and restart eventId increment.

Use the following DB schema;

EVENT table (table is new)

name type values notes
eventId auto-increment, NOT NULL
logId log table id ref, NOT NULL
isFirstLog bool default true
eventType enum 0-71 NOT NULL
rawLine string NOT NULL
lineNumber number NOT NULL
timestamp datetime NOT NULL
gameTime number seconds NOT NULL
extraData string (prefer json format?)
playerFrom player table id ref
playerFromClass short 0-9
playerTo player table id ref
playerToClass short 0-9
withWeapon short 0-39
playerFromFlag bool default false
playerToFlag bool default false

PLAYER table (table is new)

name type desc notes
playerId auto-increment, NOT NULL
playerName string NOT NULL
playerAlias string
steamId number see SteamID doc

LOGS table (* are new columns)

name type values notes
* logId auto-increment, NOT NULL
parsedlog string output URI slug
log_file1 string matches name in uploads/
log_file2 string matches name in uploads/
date_parsed datetime initial upload time
date_match datetime reported in local time
map string can be ""
server string
num_players int
* is_valid bool default false

PARSEDLOGS table (table is new)

name type values notes
logId auto-increment, NOT NULL
jsonSummary varchar(MAX) full json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant