Fix a migration issue with wildcard aliases

master
Pierre Jaury 8 years ago
parent bfe9ededbc
commit 0d3c75aa89

@ -189,7 +189,7 @@ class Alias(Email):
""" """
domain = db.relationship(Domain, domain = db.relationship(Domain,
backref=db.backref('aliases', cascade='all, delete-orphan')) 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=[]) destination = db.Column(CommaSeparatedList, nullable=False, default=[])

@ -15,7 +15,7 @@ import sqlalchemy as sa
def upgrade(): 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(): def downgrade():

Loading…
Cancel
Save