alembic: Add support for MS-SQL

MS-SQL has no native Enum-type support and therefore
needs to work with constraints.
Since these constraints need unique names the suggested approach
referenced in the following alembic documentation has been applied:
http://bit.ly/2x9r8pb

ASTERISK-27255 #close

Change-Id: I8b579750dae0c549f1103ee50172644afb9b2f95
This commit is contained in:
Florian Floimair
2017-09-05 18:13:19 +02:00
committed by Kevin Harwell
parent 3a6291b534
commit 9620a2bd20
30 changed files with 104 additions and 12 deletions

View File

@@ -28,4 +28,6 @@ def upgrade():
def downgrade():
if op.get_context().bind.dialect.name == 'mssql':
op.drop_constraint('ck_ps_endpoints_rtcp_mux_yesno_values','ps_endpoints')
op.drop_column('ps_endpoints', 'rtcp_mux')