mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-14 12:10:24 +08:00
MAINT: Enforce uniqueness of sid column
This commit is contained in:
@@ -258,7 +258,12 @@ class AssetDBWriter(with_metaclass(ABCMeta)):
|
||||
self.asset_router = sa.Table(
|
||||
'asset_router',
|
||||
metadata,
|
||||
sa.Column('sid', sa.Integer, primary_key=constraints),
|
||||
sa.Column(
|
||||
'sid',
|
||||
sa.Integer,
|
||||
unique=True,
|
||||
nullable=False,
|
||||
primary_key=constraints),
|
||||
sa.Column('asset_type', sa.Text),
|
||||
)
|
||||
metadata.create_all(checkfirst=True)
|
||||
|
||||
Reference in New Issue
Block a user