[Sqlalchemy-tickets] Issue #4317: MSSQL TIMESTAMP as primary_key error on Insert (zzzeek/sqlalchemy
Brought to you by:
zzzeek
From: Pinguin P. <iss...@bi...> - 2018-08-09 13:10:39
|
New issue 4317: MSSQL TIMESTAMP as primary_key error on Insert https://bitbucket.org/zzzeek/sqlalchemy/issues/4317/mssql-timestamp-as-primary_key-error-on Pinguin Pinguin: ``` #!python class Inventur(base.Base): __tablename__ = 't341' item = Column('item', Integer, primary_key=False) ts = Column('ts', TIMESTAMP(convert_int=False), primary_key=True) __table_args__ = ( ) article_inventur = Inventur( item=123, ) session.add(article_inventur) session.flush() ``` SAWarning: Column 't341.ts' is marked as a member of the primary key for table 't341', but has no Python-side or server-side default generator indicated, nor does it indicate 'autoincrement=True' or 'nullable=True', and no explicit value is passed. Primary key columns typically may not store NULL. TIMESTAMP is an auto value |