[Asterisk-code-review] alembic: Add table for 'resource list' PJSIP RLS type. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Apr 25 11:41:29 CDT 2017


Joshua Colp has uploaded a new change for review. ( https://gerrit.asterisk.org/5526 )

Change subject: alembic: Add table for 'resource_list' PJSIP RLS type.
......................................................................

alembic: Add table for 'resource_list' PJSIP RLS type.

This change adds an Alembic migration which adds a
ps_resource_list table that can contain resource_list
RLS configuration objects.

ASTERISK-26929

Change-Id: I7c888fafc67b3e87012de974f71ca7a5b8b1ec05
---
A contrib/ast-db-manage/config/versions/1d0e332c32af_create_rls_table.py
1 file changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/26/5526/1

diff --git a/contrib/ast-db-manage/config/versions/1d0e332c32af_create_rls_table.py b/contrib/ast-db-manage/config/versions/1d0e332c32af_create_rls_table.py
new file mode 100644
index 0000000..727554f
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/1d0e332c32af_create_rls_table.py
@@ -0,0 +1,28 @@
+"""create rls table
+
+Revision ID: 1d0e332c32af
+Revises: 2da192dbbc65
+Create Date: 2017-04-25 12:50:09.412662
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '1d0e332c32af'
+down_revision = '2da192dbbc65'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+    op.create_table(
+        'ps_resource_list',
+        sa.Column('id', sa.String(40), nullable=False, unique=True),
+        sa.Column('list_item', sa.String(2048)),
+        sa.Column('event', sa.String(40)),
+    )
+
+    op.create_index('ps_resource_list_id', 'ps_resource_list', ['id'])
+
+def downgrade():
+    op.drop_table('ps_resource_list')

-- 
To view, visit https://gerrit.asterisk.org/5526
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c888fafc67b3e87012de974f71ca7a5b8b1ec05
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list