contrib: Fix verifyi typo in alembic DB script ps_transport table.
authorWalter Doekes <walter+asterisk@wjd.nu>
Mon, 15 Sep 2014 10:50:11 +0000 (10:50 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Mon, 15 Sep 2014 10:50:11 +0000 (10:50 +0000)
Reported by: Zogot (on IRC)
Patches:
  tmp.diff uploaded by Zogot, cleaned up by me.
........

Merged revisions 423128 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 423129 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423130 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/ast-db-manage/config/versions/5950038a6ead_fix_pjsip_verifiy_typo.py [new file with mode: 0644]

diff --git a/contrib/ast-db-manage/config/versions/5950038a6ead_fix_pjsip_verifiy_typo.py b/contrib/ast-db-manage/config/versions/5950038a6ead_fix_pjsip_verifiy_typo.py
new file mode 100644 (file)
index 0000000..28ebc8b
--- /dev/null
@@ -0,0 +1,29 @@
+"""Fix pjsip transports verify column
+
+Revision ID: 5950038a6ead
+Revises: d39508cb8d8
+Create Date: 2014-09-15 06:21:35.047314
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '5950038a6ead'
+down_revision = 'd39508cb8d8'
+
+from alembic import op
+from sqlalchemy.dialects.postgresql import ENUM
+
+YESNO_NAME = 'yesno_values'
+YESNO_VALUES = ['yes', 'no']
+
+
+def upgrade():
+    yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
+    op.alter_column('ps_transports', 'verifiy_server', type_=yesno_values,
+                    new_column_name='verify_server')
+
+
+def downgrade():
+    yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
+    op.alter_column('ps_transports', 'verify_server', type_=yesno_values,
+                    new_column_name='verifiy_server')