summaryrefslogtreecommitdiff
path: root/src/mailman/database/alembic/versions/4bd95c99b2e7_fix_template_password.py
diff options
context:
space:
mode:
authorAurélien Bompard2017-05-24 11:05:35 +0200
committerBarry Warsaw2017-05-24 16:13:37 -0700
commit3e28a57b7107543f25bdfd7a13ab72e730494e6a (patch)
tree45c5528b5de465bebc4d614f66cbe56a92b450d3 /src/mailman/database/alembic/versions/4bd95c99b2e7_fix_template_password.py
parent3ed138204945d73fbaf2e2123f1bccc91d7eabdd (diff)
downloadmailman-3e28a57b7107543f25bdfd7a13ab72e730494e6a.tar.gz
mailman-3e28a57b7107543f25bdfd7a13ab72e730494e6a.tar.zst
mailman-3e28a57b7107543f25bdfd7a13ab72e730494e6a.zip
Diffstat (limited to 'src/mailman/database/alembic/versions/4bd95c99b2e7_fix_template_password.py')
-rw-r--r--src/mailman/database/alembic/versions/4bd95c99b2e7_fix_template_password.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mailman/database/alembic/versions/4bd95c99b2e7_fix_template_password.py b/src/mailman/database/alembic/versions/4bd95c99b2e7_fix_template_password.py
new file mode 100644
index 000000000..95a6a18f5
--- /dev/null
+++ b/src/mailman/database/alembic/versions/4bd95c99b2e7_fix_template_password.py
@@ -0,0 +1,25 @@
+"""Fix template password field.
+
+Revision ID: 4bd95c99b2e7
+Revises: 3002bac0c25a
+Create Date: 2017-05-24 10:56:41.256602
+
+"""
+
+from alembic import op
+from mailman.database.types import SAUnicode
+
+
+# revision identifiers, used by Alembic.
+revision = '4bd95c99b2e7'
+down_revision = '3002bac0c25a'
+
+
+def upgrade():
+ with op.batch_alter_table('template') as batch_op:
+ batch_op.alter_column('password', type_=SAUnicode)
+
+
+def downgrade():
+ # Don't go back to DateTime, it will fail if a password was set.
+ pass