Darks
1d638689c6
- remove `title` attribute - do the migration of db - add initialization routine in `master.py` - add default trophies and titles in `data/trophies.yaml` - add `add_trophy` method in `Member` class - add `update_trophies` method in `Member` class - add form in admin panel to give a trophy to a member - same to remove a trophy - change `if request.method == "POST"` to `if form.submit.data`
29 lines
685 B
Python
29 lines
685 B
Python
"""Update des titres et trophées 2
|
|
|
|
Revision ID: 87b039db71a5
|
|
Revises: 6ae59d74cf54
|
|
Create Date: 2019-06-10 19:27:45.227037
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '87b039db71a5'
|
|
down_revision = '6ae59d74cf54'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('title', 'title')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('title', sa.Column('title', sa.TEXT(), autoincrement=False, nullable=True))
|
|
# ### end Alembic commands ###
|