Re: [sqlalchemy] create table CheckConstraint

2018-03-20 Thread lone ois
Mike thank you. I think, Use __table_args__ This is the definitive usage. If you can add a sample to the Sqlalchemy documentation. Let beginners avoid using the wrong method and confused. Mike Bayer於 2018年3月19日星期一 UTC+8下午9時27分47秒寫道: > > On Mon, Mar 19, 2018 at 12:52 AM, lone ois

Re: [sqlalchemy] create table CheckConstraint

2018-03-19 Thread Mike Bayer
On Mon, Mar 19, 2018 at 12:52 AM, lone ois wrote: > Hi! > i test sqlalchemy 1.1.12 - 1.2.5 > create table check constraint. > --- > class testTable(db): > __tablename__ = 'testTable' > > id = Column(INT, primary_key = True, autoincrement

[sqlalchemy] create table CheckConstraint

2018-03-18 Thread lone ois
Hi! i test sqlalchemy 1.1.12 - 1.2.5 create table check constraint. --- class testTable(db): __tablename__ = 'testTable' id = Column(INT, primary_key = True, autoincrement = True, unique = True) ser = Column(INT) CheckConstraint('ser>100')