-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track stronghold battles and use resources earned in payout
Resources earned by players are determined from the replay file and stored in the database. In the payout form the number of points to give for each resource earned can be entered and is factored into the gold share calculation. Feature request from #38
- Loading branch information
Showing
7 changed files
with
103 additions
and
23 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
whyattend/alembic/versions/2413542ce715_stronghold_support.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Stronghold support | ||
Revision ID: 2413542ce715 | ||
Revises: 398cf0b7b8c8 | ||
Create Date: 2014-11-08 18:03:01.861716 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '2413542ce715' | ||
down_revision = '398cf0b7b8c8' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.add_column('battle', sa.Column('stronghold', sa.Boolean(), nullable=True)) | ||
op.add_column('player_battle', sa.Column('resources_earned', sa.Integer(), nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('player_battle', 'resources_earned') | ||
op.drop_column('battle', 'stronghold') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters