-
x1
+ {% if user.az_completions > 0 %}
+
x{{ user.az_completions }}
+ {% endif %}
Completed
{% for hero in user.random_heroes.completed %}
diff --git a/migrations/versions/23bfef078b06_.py b/migrations/versions/23bfef078b06_.py
deleted file mode 100644
index dbee176..0000000
--- a/migrations/versions/23bfef078b06_.py
+++ /dev/null
@@ -1,28 +0,0 @@
-"""empty message
-
-Revision ID: 23bfef078b06
-Revises: 47c81a0d0be7
-Create Date: 2014-06-22 18:04:41.935383
-
-"""
-
-# revision identifiers, used by Alembic.
-revision = '23bfef078b06'
-down_revision = '47c81a0d0be7'
-
-from alembic import op
-import sqlalchemy as sa
-
-
-def upgrade():
- ### commands auto generated by Alembic - please adjust! ###
- op.add_column('user', sa.Column('winrate_interval', sa.Integer(), nullable=True))
- op.add_column('user', sa.Column('winrate_map', sa.Boolean(), nullable=True))
- ### end Alembic commands ###
-
-
-def downgrade():
- ### commands auto generated by Alembic - please adjust! ###
- op.drop_column('user', 'winrate_map')
- op.drop_column('user', 'winrate_interval')
- ### end Alembic commands ###
diff --git a/migrations/versions/47c81a0d0be7_.py b/migrations/versions/a6f7dd522b7_.py
similarity index 94%
rename from migrations/versions/47c81a0d0be7_.py
rename to migrations/versions/a6f7dd522b7_.py
index 382d392..f22b83f 100644
--- a/migrations/versions/47c81a0d0be7_.py
+++ b/migrations/versions/a6f7dd522b7_.py
@@ -1,13 +1,13 @@
"""empty message
-Revision ID: 47c81a0d0be7
+Revision ID: a6f7dd522b7
Revises: None
-Create Date: 2014-06-22 17:22:24.865474
+Create Date: 2014-06-22 22:35:25.691983
"""
# revision identifiers, used by Alembic.
-revision = '47c81a0d0be7'
+revision = 'a6f7dd522b7'
down_revision = None
from alembic import op
@@ -16,25 +16,6 @@ import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
- op.create_table('event',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('name', sa.String(length=200), nullable=True),
- sa.Column('desc', sa.String(length=4096), nullable=True),
- sa.Column('type', sa.String(length=20), nullable=True),
- sa.Column('start_time', sa.DateTime(), nullable=True),
- sa.Column('end_time', sa.DateTime(), nullable=True),
- sa.Column('points', sa.Integer(), nullable=True),
- sa.Column('reward_threshold', sa.Integer(), nullable=True),
- sa.Column('total_subchans', sa.Integer(), nullable=True),
- sa.Column('channels', sa.Json(), nullable=True),
- sa.PrimaryKeyConstraint('id')
- )
- op.create_table('teamspeak_data',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('time', sa.DateTime(), nullable=True),
- sa.Column('clients', sa.Json(), nullable=True),
- sa.PrimaryKeyConstraint('id')
- )
op.create_table('user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('steam_id', sa.String(length=40), nullable=True),
@@ -48,6 +29,7 @@ def upgrade():
sa.Column('last_seen', sa.DateTime(), nullable=True),
sa.Column('twitch', sa.String(length=60), nullable=True),
sa.Column('random_heroes', sa.Json(), nullable=True),
+ sa.Column('az_completions', sa.Integer(), nullable=True),
sa.Column('public', sa.Boolean(), nullable=True),
sa.Column('logo', sa.Boolean(), nullable=True),
sa.Column('points_from_events', sa.Integer(), nullable=True),
@@ -62,12 +44,31 @@ def upgrade():
sa.UniqueConstraint('steam_id'),
sa.UniqueConstraint('teamspeak_id')
)
+ op.create_table('teamspeak_data',
+ sa.Column('id', sa.Integer(), nullable=False),
+ sa.Column('time', sa.DateTime(), nullable=True),
+ sa.Column('clients', sa.Json(), nullable=True),
+ sa.PrimaryKeyConstraint('id')
+ )
+ op.create_table('event',
+ sa.Column('id', sa.Integer(), nullable=False),
+ sa.Column('name', sa.String(length=200), nullable=True),
+ sa.Column('desc', sa.String(length=4096), nullable=True),
+ sa.Column('type', sa.String(length=20), nullable=True),
+ sa.Column('start_time', sa.DateTime(), nullable=True),
+ sa.Column('end_time', sa.DateTime(), nullable=True),
+ sa.Column('points', sa.Integer(), nullable=True),
+ sa.Column('reward_threshold', sa.Integer(), nullable=True),
+ sa.Column('total_subchans', sa.Integer(), nullable=True),
+ sa.Column('channels', sa.Json(), nullable=True),
+ sa.PrimaryKeyConstraint('id')
+ )
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
- op.drop_table('user')
- op.drop_table('teamspeak_data')
op.drop_table('event')
+ op.drop_table('teamspeak_data')
+ op.drop_table('user')
### end Alembic commands ###
diff --git a/periodic.py b/periodic.py
index 97462d9..4395d64 100644
--- a/periodic.py
+++ b/periodic.py
@@ -181,10 +181,12 @@ def award_idle_ts3_points(server, cfg):
doob.update_connection()
active_users.add(doob)
doobs = set(models.User.query.filter(models.User.ts3_starttime != None).all())
+ '''
print doobs, active_users
for doob in doobs.intersection(active_users):
print(doob.nickname)
- #doob.finalize_connection()
+ doob.finalize_connection()
+ '''
if __name__ == "__main__":