]> de.git.xonotic.org Git - xonotic/xonstatdb.git/blob - README
Align weapon codes with what is emitted in the stats code.
[xonotic/xonstatdb.git] / README
1 This is the source for xonstatdb, the Xonotic Statistics database.
2 All code herein is intended for the PostgreSQL database management server.
3
4 To build, first create the user that will own all of the objects in the 
5 database. You must run this as an administrator user in your cluster.
6 See your operating system's guidelines for how this is set up on 
7 your system:
8     
9     create user xonstat with password 'xonstat';
10
11     *Note: please change this password
12
13 Next, create the database itself:
14
15     CREATE DATABASE xonstatdb
16       WITH ENCODING='UTF8'
17         OWNER=xonstat
18         CONNECTION LIMIT=-1;
19
20 Create the schema in which all of the xonstat tables will reside:
21
22     CREATE SCHEMA xonstat
23        AUTHORIZATION xonstat;
24
25 Navigate to the 'build' directory. Log into the database as the 
26 admin user created above and issue the following to build the
27 initial tables:
28
29     \i build/build_full.sql
30
31     *Note: You will see a lot of NOTICE messages. This is normal.
32
33 TODO:
34
35 - Define indexes
36 - Audit report SQL to verify index usage 
37 - ? Partition games, player_game_stats, player_weapon_stats via inheritance