summaryrefslogtreecommitdiff
path: root/contrib/ast-db-manage/config/versions/136885b81223_add_regcontext_to_pj.py
AgeCommit message (Collapse)Author
2016-04-07alembic: Remove batch operations (and sqlite support)George Joseph
Because SQLite doesn't support full ALTER capabilities, alembic scripts require batch operations. However, that capability wasn't available until 0.7.0 which some distributions haven't reached yet. Therefore, the batch operations introduced in commit 86d6e44cc (review 2319) have been reverted and SQLite is unsupported again, for now anyway. Tested the full upgrade and downgrade on MySQL/Mariadb and Postgresql. ASTERISK-25890 #close Reported-by: Harley Peters Change-Id: I82eba5456736320256f6775f5b0b40133f4d1c80
2016-03-02alembic: Fix downgrade and tweak for sqliteGeorge Joseph
Downgrade had a few issues. First there was an errant 'update' statement in add_auto_dtmf_mode that looks like it was a copy/paste error. Second, we weren't cleaning up the ENUMs so subsequent upgrades on postgres failed because the types already existed. For sqlite... sqlite doesn't support ALTER or DROP COLUMN directly. Fortunately alembic batch_operations takes care of this for us if we use it so the alter and drops were converted to use batch operations. Here's an example downgrade: with op.batch_alter_table('ps_endpoints') as batch_op: batch_op.drop_column('tos_audio') batch_op.drop_column('tos_video') batch_op.add_column(sa.Column('tos_audio', yesno_values)) batch_op.add_column(sa.Column('tos_video', yesno_values)) batch_op.drop_column('cos_audio') batch_op.drop_column('cos_video') batch_op.add_column(sa.Column('cos_audio', yesno_values)) batch_op.add_column(sa.Column('cos_video', yesno_values)) with op.batch_alter_table('ps_transports') as batch_op: batch_op.drop_column('tos') batch_op.add_column(sa.Column('tos', yesno_values)) # Can't cast integers to YESNO_VALUES, so dropping and adding is required batch_op.drop_column('cos') batch_op.add_column(sa.Column('cos', yesno_values)) Upgrades from base to head and downgrades from head to base were tested repeatedly for postgresql, mysql/mariadb, and sqlite3. Change-Id: I862b0739eb3fd45ec3412dcc13c2340e1b7baef8
2016-01-19Fix alembic branches on v13.Richard Mudgett
Change-Id: I313449b609ede18ad1e1763a655dd23b9210a8e0
2016-01-11pjsip: Add option global/regcontextDaniel Journo
Added new global option (regcontext) to pjsip. When set, Asterisk will dynamically create and destroy a NoOp priority 1 extension for a given endpoint who registers or unregisters with us. ASTERISK-25670 #close Reported-by: Daniel Journo Change-Id: Ib1530c5b45340625805c057f8ff1fb240a43ea62