mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	When app_macro was deprecated, the macrocontext column was removed from the INSERT statement but the binds were not renumbered. This broke the insert. This change removes the macrocontext column via alembic and re-numbers the existing columns in the INSERT. Fixes: #527 UserNote: The fix requires removing the macrocontext column from the voicemail_messages table in the voicemail database via alembic upgrade. UpgradeNote: The fix requires that the voicemail database be upgraded via alembic. Upgrading to the latest voicemail database via alembic will remove the macrocontext column from the voicemail_messages table.
		
			
				
	
	
		
			23 lines
		
	
	
		
			445 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			445 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| """Remove macrocontext field
 | |
| 
 | |
| Revision ID: 1c55c341360f
 | |
| Revises: 39428242f7f5
 | |
| Create Date: 2024-01-09 15:01:39.698918
 | |
| 
 | |
| """
 | |
| 
 | |
| # revision identifiers, used by Alembic.
 | |
| revision = '1c55c341360f'
 | |
| down_revision = '39428242f7f5'
 | |
| 
 | |
| from alembic import op
 | |
| import sqlalchemy as sa
 | |
| 
 | |
| 
 | |
| def upgrade():
 | |
|     op.drop_column('voicemail_messages', 'macrocontext')
 | |
| 
 | |
| 
 | |
| def downgrade():
 | |
|     op.add_column('voicemail_messages', sa.Column('macrocontext', sa.String(80)))
 |