Re: [sqlalchemy] sqlalchemy with autoincrement and foreignkey

2014-03-16 Thread Yunlong Mao
Thank you very much. it's very helpful to me. 在 2014年3月14日星期五UTC+8下午11时23分07秒,Michael Bayer写道: > > > On Mar 14, 2014, at 1:28 AM, Yunlong Mao > > wrote: > > Hi all, > > I have some problem with sqlalchemy and mysql. > > """ > class User(db.Model, UserMixin): > __tablename__ = 'user' > >

Re: [sqlalchemy] sqlalchemy with autoincrement and foreignkey

2014-03-14 Thread Michael Bayer
On Mar 14, 2014, at 1:28 AM, Yunlong Mao wrote: > Hi all, > > I have some problem with sqlalchemy and mysql. > > """ > class User(db.Model, UserMixin): > __tablename__ = 'user' > > id = Column(Integer, autoincrement=True, nullable=False, unique=True, > index=True) > coreid = Colu

[sqlalchemy] sqlalchemy with autoincrement and foreignkey

2014-03-13 Thread Yunlong Mao
Hi all, I have some problem with sqlalchemy and mysql. """ class User(db.Model, UserMixin): __tablename__ = 'user' id = Column(Integer, autoincrement=True, nullable=False, unique=True, index=True) coreid = Column(String(32), primary_key=True) """ u_r_association = Table('user_role',