Set a proper default for spam thresholds

This commit is contained in:
Pierre Jaury
2016-08-18 20:42:55 +02:00
parent 1ce0bf2ef7
commit 58337d7dd6
2 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
""" Update the spam threshold default value
Revision ID: a4accda8a8c7
Revises: c5696b48442d
Create Date: 2016-08-18 20:34:19.624603
"""
# revision identifiers, used by Alembic.
revision = 'a4accda8a8c7'
down_revision = 'c5696b48442d'
from alembic import op
import sqlalchemy as sa
def upgrade():
with op.batch_alter_table('user') as batch:
batch.drop_column('spam_threshold')
batch.add_column(sa.Column('spam_threshold', sa.Numeric(),
default=10.0))
def downgrade():
pass