odapi/migrations/versions/1387db583e1d_set_default_va...

26 lines
488 B
Python
Raw Normal View History

2020-09-17 17:35:11 +02:00
"""set default value for badge
Revision ID: 1387db583e1d
Revises: 9ee45f714f8b
Create Date: 2020-09-15 19:31:15.709945
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "1387db583e1d"
down_revision = "9ee45f714f8b"
branch_labels = None
depends_on = None
def upgrade():
with op.batch_alter_table("users") as batch_op:
batch_op.alter_column(column_name="badge", server_default=sa.text("0"))
def downgrade():
pass