<p>Benjamin Keith Ford has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11183">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">alembic: Fix errors during upgrade head.<br><br>When trying to upgrade using alembic, a couple different errors kept<br>popping up that prevented the upgrade. An additional parameter was<br>needed when changing the schema for mwi_subscribe_replaces_unsolicited<br>from an integer to an enum. When changing from a string to an enum, the<br>type needed to be cast for postgresql. The other issue was a parameter<br>being used during column creation that did not exist.<br><br>Change-Id: Ib4d70cf3ce5080023a50be496272a777b55d6c8e<br>---<br>M contrib/ast-db-manage/config/versions/f3c0b8695b66_taskprocessor_overload_trigger.py<br>M contrib/ast-db-manage/config/versions/fe6592859b85_fix_mwi_subscribe_replaces_.py<br>2 files changed, 3 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/83/11183/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/ast-db-manage/config/versions/f3c0b8695b66_taskprocessor_overload_trigger.py b/contrib/ast-db-manage/config/versions/f3c0b8695b66_taskprocessor_overload_trigger.py</span><br><span>index 6a5b9b2..0b500aa 100644</span><br><span>--- a/contrib/ast-db-manage/config/versions/f3c0b8695b66_taskprocessor_overload_trigger.py</span><br><span>+++ b/contrib/ast-db-manage/config/versions/f3c0b8695b66_taskprocessor_overload_trigger.py</span><br><span>@@ -28,8 +28,7 @@</span><br><span>     op.add_column('ps_globals',</span><br><span>         sa.Column('taskprocessor_overload_trigger',</span><br><span>             sa.Enum(*PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_VALUES,</span><br><span style="color: hsl(0, 100%, 40%);">-            name=PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME,</span><br><span style="color: hsl(0, 100%, 40%);">-            create_type=False)))</span><br><span style="color: hsl(120, 100%, 40%);">+            name=PJSIP_TASKPROCESSOR_OVERLOAD_TRIGGER_NAME)))</span><br><span> </span><br><span> def downgrade():</span><br><span>     if op.get_context().bind.dialect.name == 'mssql':</span><br><span>diff --git a/contrib/ast-db-manage/config/versions/fe6592859b85_fix_mwi_subscribe_replaces_.py b/contrib/ast-db-manage/config/versions/fe6592859b85_fix_mwi_subscribe_replaces_.py</span><br><span>index 4ecaaf7..c8005c9 100644</span><br><span>--- a/contrib/ast-db-manage/config/versions/fe6592859b85_fix_mwi_subscribe_replaces_.py</span><br><span>+++ b/contrib/ast-db-manage/config/versions/fe6592859b85_fix_mwi_subscribe_replaces_.py</span><br><span>@@ -34,7 +34,7 @@</span><br><span>     op.alter_column('ps_endpoints', 'mwi_subscribe_replaces_unsolicited',</span><br><span>                     type_=sa.String(5))</span><br><span>     op.alter_column('ps_endpoints', 'mwi_subscribe_replaces_unsolicited',</span><br><span style="color: hsl(0, 100%, 40%);">-                    type_=ast_bool_values)</span><br><span style="color: hsl(120, 100%, 40%);">+            type_=ast_bool_values, postgresql_using='mwi_subscribe_replaces_unsolicited::{0}'.format(AST_BOOL_NAME))</span><br><span> </span><br><span> </span><br><span> def downgrade():</span><br><span>@@ -55,7 +55,7 @@</span><br><span>     op.alter_column('ps_endpoints', 'mwi_subscribe_replaces_unsolicited',</span><br><span>                     type_=sa.String(5))</span><br><span>     op.alter_column('ps_endpoints', 'mwi_subscribe_replaces_unsolicited',</span><br><span style="color: hsl(0, 100%, 40%);">-                    type_=sa.Integer)</span><br><span style="color: hsl(120, 100%, 40%);">+            type_=sa.Integer, postgresql_using='mwi_subscribe_replaces_unsolicited::{0}'.format(sa.Integer))</span><br><span> </span><br><span>     if op.get_context().bind.dialect.name == 'postgresql':</span><br><span>         ENUM(name=AST_BOOL_NAME).drop(op.get_bind(), checkfirst=False)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11183">change 11183</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11183"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: Ib4d70cf3ce5080023a50be496272a777b55d6c8e </div>
<div style="display:none"> Gerrit-Change-Number: 11183 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>