From 0d3c75aa897f6bdd4b6d0499c85f3f30efc5d8d9 Mon Sep 17 00:00:00 2001 From: Pierre Jaury Date: Sat, 20 Aug 2016 12:23:55 +0200 Subject: [PATCH] Fix a migration issue with wildcard aliases --- admin/freeposte/admin/models.py | 2 +- admin/migrations/versions/c5696b48442d_.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/freeposte/admin/models.py b/admin/freeposte/admin/models.py index 07c3e5b6..b9b18f68 100644 --- a/admin/freeposte/admin/models.py +++ b/admin/freeposte/admin/models.py @@ -189,7 +189,7 @@ class Alias(Email): """ domain = db.relationship(Domain, backref=db.backref('aliases', cascade='all, delete-orphan')) - wildcard = db.Column(db.Boolean(), default=False) + wildcard = db.Column(db.Boolean(), nullable=False, default=False) destination = db.Column(CommaSeparatedList, nullable=False, default=[]) diff --git a/admin/migrations/versions/c5696b48442d_.py b/admin/migrations/versions/c5696b48442d_.py index 1ca05aff..a613a267 100644 --- a/admin/migrations/versions/c5696b48442d_.py +++ b/admin/migrations/versions/c5696b48442d_.py @@ -15,7 +15,7 @@ import sqlalchemy as sa def upgrade(): - op.add_column('alias', sa.Column('wildcard', sa.Boolean(), nullable=True)) + op.add_column('alias', sa.Column('wildcard', sa.Boolean(), nullable=False, default=False)) def downgrade():