Ticket #2700: table_schema.diff

File table_schema.diff, 620 bytes (added by serbaut@…, 18 years ago)
  • introspection.py

     
    3535        cursor.execute("""
    3636            SELECT column_name, referenced_table_name, referenced_column_name
    3737            FROM information_schema.key_column_usage
    38             WHERE table_name = %s
     38            WHERE table_name = %s AND table_schema = DATABASE()
    3939                AND referenced_table_name IS NOT NULL
    4040                AND referenced_column_name IS NOT NULL""", [table_name])
    4141        constraints.extend(cursor.fetchall())
Back to Top