[Asterisk-code-review] alembic/res pjsip: Add "webrtc" configuration option (asterisk[master])
Kevin Harwell
asteriskteam at digium.com
Wed Aug 2 09:46:18 CDT 2017
Kevin Harwell has uploaded this change for review. ( https://gerrit.asterisk.org/6125
Change subject: alembic/res_pjsip: Add "webrtc" configuration option
......................................................................
alembic/res_pjsip: Add "webrtc" configuration option
When the "webrtc" option was added in res_pjsip it was not added to the alembic
scripts. This patch adds the option for alembic.
ASTERISK-27119 #close
Change-Id: I3e199f060aea25e193c439fc5cf96be4d3ed1c7b
---
A contrib/ast-db-manage/config/versions/44ccced114ce_add_webrtc_enabled.py
1 file changed, 31 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/6125/1
diff --git a/contrib/ast-db-manage/config/versions/44ccced114ce_add_webrtc_enabled.py b/contrib/ast-db-manage/config/versions/44ccced114ce_add_webrtc_enabled.py
new file mode 100644
index 0000000..83fdbd9
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/44ccced114ce_add_webrtc_enabled.py
@@ -0,0 +1,31 @@
+"""add_webrtc_enabled
+
+Revision ID: 44ccced114ce
+Revises: 164abbd708c
+Create Date: 2017-07-10 17:07:25.926150
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '44ccced114ce'
+down_revision = '164abbd708c'
+
+from alembic import op
+import sqlalchemy as sa
+from sqlalchemy.dialects.postgresql import ENUM
+
+YESNO_NAME = 'yesno_values'
+YESNO_VALUES = ['yes', 'no']
+
+def upgrade():
+ ############################# Enums ##############################
+
+ # yesno_values have already been created, so use postgres enum object
+ # type to get around "already created" issue - works okay with mysql
+ yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
+
+ op.add_column('ps_endpoints', sa.Column('webrtc_enabled', yesno_values))
+
+
+def downgrade():
+ op.drop_column('ps_endpoints', 'webrtc_enabled')
--
To view, visit https://gerrit.asterisk.org/6125
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e199f060aea25e193c439fc5cf96be4d3ed1c7b
Gerrit-Change-Number: 6125
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170802/77489617/attachment-0001.html>
More information about the asterisk-code-review
mailing list