[asterisk-commits] Add prune contacts alembic script to 15.0 (asterisk[15.0])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 7 12:19:27 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6435 )

Change subject: Add prune contacts alembic script to 15.0
......................................................................

Add prune contacts alembic script to 15.0

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

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Kevin Harwell: Looks good to me, approved



diff --git a/contrib/ast-db-manage/config/versions/f3d1c5d38b56_add_prune_on_boot.py b/contrib/ast-db-manage/config/versions/f3d1c5d38b56_add_prune_on_boot.py
new file mode 100644
index 0000000..fe9c35e
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/f3d1c5d38b56_add_prune_on_boot.py
@@ -0,0 +1,28 @@
+"""add_prune_on_boot
+
+Revision ID: f3d1c5d38b56
+Revises: 44ccced114ce
+Create Date: 2017-08-04 17:31:23.124767
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = 'f3d1c5d38b56'
+down_revision = '44ccced114ce'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+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_contacts', sa.Column('prune_on_boot', yesno_values))
+
+
+def downgrade():
+    op.drop_column('ps_contacts', 'prune_on_boot')

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

Gerrit-Project: asterisk
Gerrit-Branch: 15.0
Gerrit-MessageType: merged
Gerrit-Change-Id: I4d1c14cdbffefdb5a62f735a80613ea5bb38dba6
Gerrit-Change-Number: 6435
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170907/810a2b00/attachment-0001.html>


More information about the asterisk-commits mailing list