2016-12-04 83 views

回答

0

這樣的事情應該工作。

table_sequence = Sequence('table_id_seq', start=1) 

class MyTable(Base): 
    __tablename__ = 'mytable' 

    id = Column(Integer, table_sequence, server_default=table_sequence.next_value()) 
+0

創建序列時出現此錯誤:TypeError:object()不帶參數 – ypicard