#22 Support FOREIGN KEY for MySQL


MySQL supports the full FOREIGN KEY syntax in versions
3.23.50 and newer, and 4.0.8 and newer, and I believe
all 4.1 and 5.0 versions. To implement this in
SQLObject-0.7a, I copied the
col.SOForeignKey.postgresCreateSQL() method to
mysqlCreateSQL() and performed some minor editing.


  • Andy Dustman

    Andy Dustman - 2005-09-22

    0.7a col.py patch for MySQL FOREIGN KEY schema support

  • Oleg Broytman

    Oleg Broytman - 2005-09-23
    • status: open --> open-later
  • Oleg Broytman

    Oleg Broytman - 2005-09-23

    Logged In: YES

    Looks good at first glance, but I am reluctant to apply such
    a patch while SQLObject is at the beta stage, espcially
    considering I use Postgres and MySQL, but not MySQL, so I
    cannot properly test it. Let's wait until post-0.7.

  • Oleg Broytman

    Oleg Broytman - 2005-10-23
    • status: open-later --> closed-accepted
  • Oleg Broytman

    Oleg Broytman - 2005-10-23

    Logged In: YES

    Applied at the revision 1135 in the trunk.

  • Nobody/Anonymous

    Logged In: NO

    I had the same problem and fixed it almost the same way as
    the bug reporter, and it worked. I think this patch should
    be included as soon as possible.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks