Thank you very much for that resolution! I use these a lot.
On Wednesday, December 5, 2012 12:37:54 PM UTC-8, Michael Bayer wrote: > > > On Dec 5, 2012, at 2:56 PM, junepeach wrote: > > > I defined several tables in my module file: mymodule.py. For example I > have table T1 and T2 defined: > > class T1(Base): > > __tablename__ = 't1' > > id = Column(Integer, primary_key = True) > > name = Column(String(15)) > > class T2(Base): > > __tablename__ = 't2' > > id = Column(Integer, primary_key = True) > > fid = Column(Integer, ForeignKey('t1.id', onupdate='CASCADE', > ondelete='CASCADE'), nullable = False) > > name = Column(String(15)) > > > > After running 'alembic revision --autogenerate', in table 't2' migration > code, I can just see something like that: > > sa.ForeignKeyConstraint(['fid'], ['t1.id'],) without clause > "onupdate='CASCADE', ondelete='CASCADE'" anymore. > > So I manually added "onupdate='CASCADE', ondelete='CASCADE'", but I have > more than 100 tables. Did I miss something in my module file mymodule.py? > > this is ticket #92 from the other day for propagation of the ondelete, > onupdate, initially, and deferred arguments of FKconstraint, just resolved > in rfd50c9605e43. > > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/YTikzkbgKM0J. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.