Q3Stats is now open source! :)

This commit is contained in:
2017-03-06 20:33:09 +01:00
commit bfdcb87cef
197 changed files with 16395 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
"""Create table `games`.
Revision ID: 32ecefbbf8d3
Revises:
Create Date: 2015-02-21 11:30:09.451628
"""
# revision identifiers, used by Alembic.
revision = '32ecefbbf8d3'
down_revision = None
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
import sqlalchemy.dialects.postgresql as pg
def upgrade():
op.create_table(
'games',
sa.Column('id', sa.Integer(), primary_key=True),
sa.Column('uuid', sa.String(36)),
sa.Column('map', sa.String(255), index=True),
sa.Column('date', sa.Date(), index=True),
sa.Column('time', sa.Time()),
sa.Column('fraglimit', sa.Integer()),
sa.Column('attrs', pg.JSON()),
sa.UniqueConstraint('uuid')
)
def downgrade():
op.drop_table('games')

View File

@@ -0,0 +1,44 @@
"""Create table `scores`.
Revision ID: 3509d93df7c
Revises: 32ecefbbf8d3
Create Date: 2015-02-21 13:27:28.102629
"""
# revision identifiers, used by Alembic.
revision = '3509d93df7c'
down_revision = '32ecefbbf8d3'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
import sqlalchemy.dialects.postgresql as pg
def upgrade():
op.create_table(
'scores',
sa.Column('id', sa.Integer(), primary_key=True),
sa.Column(
'game_id', sa.Integer(), sa.ForeignKey('games.id'), index=True
),
sa.Column('player', sa.String(255), index=True),
sa.Column('score', sa.Integer()),
sa.Column('kills', sa.Integer()),
sa.Column('deaths', sa.Integer()),
sa.Column('suicides', sa.Integer()),
sa.Column('net', sa.Integer()),
sa.Column('damage_taken', sa.Integer()),
sa.Column('damage_given', sa.Integer()),
sa.Column('total_health', sa.Integer()),
sa.Column('total_armor', sa.Integer()),
sa.Column('weapons', pg.JSON()),
sa.Column('items', pg.JSON()),
sa.Column('powerups', pg.JSON()),
)
def downgrade():
op.drop_table('scores')