[Asterisk-code-review] alembic/sqlalchemy: auto increment only allowed on a single ... (asterisk[14.0])
Kevin Harwell
asteriskteam at digium.com
Tue Aug 9 12:14:36 CDT 2016
Kevin Harwell has uploaded a new change for review.
https://gerrit.asterisk.org/3439
Change subject: alembic/sqlalchemy: auto increment only allowed on a single column
......................................................................
alembic/sqlalchemy: auto increment only allowed on a single column
The extensions table defined two columns (id and priority) as primary key
autoincrement columns. However only one is allowed when defining the primary
key.
This patch removes the autoincrement attribute from the priority column since
it does not need to be as such and really should not have been on there in the
first place.
ASTERISK-26183 #close
Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b
---
M contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py
1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/39/3439/1
diff --git a/contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py b/contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py
index ecee0e0..77cd938 100755
--- a/contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py
+++ b/contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py
@@ -31,7 +31,6 @@
from alembic import op
import sqlalchemy as sa
-
def upgrade():
op.create_table(
'extensions',
@@ -39,8 +38,7 @@
unique=True, autoincrement=True),
sa.Column('context', sa.String(40), primary_key=True, nullable=False),
sa.Column('exten', sa.String(40), primary_key=True, nullable=False),
- sa.Column('priority', sa.Integer, primary_key=True, nullable=False,
- autoincrement=True),
+ sa.Column('priority', sa.Integer, primary_key=True, nullable=False),
sa.Column('app', sa.String(40), nullable=False),
sa.Column('appdata', sa.String(256), nullable=False),
)
--
To view, visit https://gerrit.asterisk.org/3439
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14.0
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
More information about the asterisk-code-review
mailing list