get5loader
get5loader copied to clipboard
[DB] Refactoring table structs
This would be heavy-breaking change perhaps. There's several reasons why I want to change it :
- team player list(team/auths) is Python2.7 's exported array binary file. which is horrible to handle with Golang. #39
- Get5 supports a lot of options to configure match such as
cvars,side_type. but some of them are static #134 - Support PhlexPlexico/get5-web style season options, vetoes, demo management.
Changes for 1, this should be camma-separated strings insted of binary. https://github.com/splewis/get5-web/issues/175
Changes for 2, type MatchConfig struct and match table needs more colmns(e.g. cvars)
Changes for 3, I probably need to add new table for season, and new colmn for veto/demo.
I need to create 2 Migration binaries for original get5-web users and new get5-web-go user.
If you want to keep compatibility with people for drop-in replacements, I would recommend just creating a new table that has FK to team and steam ID. Keeps the database normalised, and allows you to include a new column for custom names during the match. That way you can check if it exists, if it fails, grab from the old PickleType then move each ID it into the new table, maybe?
yeah thats better,I dont want to "change" current structs,I wanna add something insted. but for now get5-web-go is not handling ForeignKey correctly(#11). So I shoulda fix it first :/
edit : nvm,I just solved FK thing :P