<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10568">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">alembic: Fix use_callerid_contact option add script.<br><br>ASTERISK-28087<br><br>Change-Id: I046d018015427d0916fab571b5a4f5367476f729<br>---<br>M contrib/ast-db-manage/config/versions/2bb1a85135ad_pjsip_add_use_callerid_contact.py<br>1 file changed, 5 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/ast-db-manage/config/versions/2bb1a85135ad_pjsip_add_use_callerid_contact.py b/contrib/ast-db-manage/config/versions/2bb1a85135ad_pjsip_add_use_callerid_contact.py</span><br><span>index 490e23d..a2d39f4 100644</span><br><span>--- a/contrib/ast-db-manage/config/versions/2bb1a85135ad_pjsip_add_use_callerid_contact.py</span><br><span>+++ b/contrib/ast-db-manage/config/versions/2bb1a85135ad_pjsip_add_use_callerid_contact.py</span><br><span>@@ -24,19 +24,16 @@</span><br><span> </span><br><span> </span><br><span> def upgrade():</span><br><span style="color: hsl(0, 100%, 40%);">- # Create the new enum</span><br><span style="color: hsl(0, 100%, 40%);">- ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)</span><br><span style="color: hsl(0, 100%, 40%);">- if op.get_context().bind.dialect.name == 'postgresql':</span><br><span style="color: hsl(0, 100%, 40%);">- ast_bool_values.create(op.get_bind(), checkfirst=False)</span><br><span style="color: hsl(120, 100%, 40%);">+ ############################# Enums ##############################</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ # ast_bool_values has already been created, so use postgres enum object</span><br><span style="color: hsl(120, 100%, 40%);">+ # type to get around "already created" issue - works okay with mysql</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)</span><br><span> </span><br><span> op.add_column('ps_globals', sa.Column('use_callerid_contact', ast_bool_values))</span><br><span> </span><br><span> </span><br><span> def downgrade():</span><br><span> if op.get_context().bind.dialect.name == 'mssql':</span><br><span style="color: hsl(0, 100%, 40%);">- op.drop_constraint('ck_ps_globals_use_callerid_contact_ast_bool_values','ps_globals')</span><br><span style="color: hsl(120, 100%, 40%);">+ op.drop_constraint('ck_ps_globals_use_callerid_contact_ast_bool_values', 'ps_globals')</span><br><span> op.drop_column('ps_globals', 'use_callerid_contact')</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- if op.get_context().bind.dialect.name == 'postgresql':</span><br><span style="color: hsl(0, 100%, 40%);">- 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/10568">change 10568</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/10568"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I046d018015427d0916fab571b5a4f5367476f729 </div>
<div style="display:none"> Gerrit-Change-Number: 10568 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>