pjsip/alembic: Fix qualify_timeout column definition
authorDaniel Journo <dan@keshercommunications.com>
Wed, 13 Jan 2016 21:58:22 +0000 (21:58 +0000)
committerDaniel Journo <dan@keshercommunications.com>
Sat, 16 Jan 2016 19:58:17 +0000 (19:58 +0000)
Corrects the qualify_timeout column type from Integer to Decimal

ASTERISK-25686 #close
Reported-by: Marcelo Terres

Change-Id: I757d0e3c011ee9be6cd5abd48bc92441a405d3c8

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

diff --git a/contrib/ast-db-manage/config/versions/3d00be6d0c1f_fix_pjsip_qualify_ti.py b/contrib/ast-db-manage/config/versions/3d00be6d0c1f_fix_pjsip_qualify_ti.py
new file mode 100644 (file)
index 0000000..e0ee399
--- /dev/null
@@ -0,0 +1,27 @@
+"""fix pjsip qualify timeout
+
+Revision ID: 3d00be6d0c1f
+Revises: 26d7f3bf0fa5
+Create Date: 2016-01-16 19:48:31.730429
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '3d00be6d0c1f'
+down_revision = '26d7f3bf0fa5'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.alter_column('ps_aors', 'qualify_timeout', type_=sa.Decimal)
+    op.alter_column('ps_contacts', 'qualify_timeout', type_=sa.Decimal)
+    pass
+
+
+def downgrade():
+    op.alter_column('ps_aors', 'qualify_timeout', type_=sa.Integer)
+    op.alter_column('ps_contacts', 'qualify_timeout', type_=sa.Integer)
+    pass
+