DDL for this constraint. Typical values include SIMPLE, PARTIAL
and FULL.
+ :param schema: Deprecated; this flag does nothing and will be removed
+ in 0.9.
"""
self._colspec = column
self.link_to_name = link_to_name
self.match = match
+ if schema:
+ util.warn_deprecated(
+ "'schema' argument on ForeignKey has no effect - "
+ "please specify the target as "
+ "<schemaname>.<tablename>.<colname>.")
+
def __repr__(self):
return "ForeignKey(%r)" % self._get_colspec()
assert b.c.a_id.references(a.c.id)
eq_(len(b.constraints), 2)
+ def test_fk_erroneous_schema_arg(self):
+ assert_raises_message(
+ exc.SADeprecationWarning,
+ "'schema' argument on ForeignKey has no effect.",
+ ForeignKey, "foo.bar", schema='myschema'
+ )
+
def test_fk_construct(self):
c1 = Column('foo', Integer)
c2 = Column('bar', Integer)