Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save theY4Kman/8963de63b07aa97f7ca8 to your computer and use it in GitHub Desktop.

Select an option

Save theY4Kman/8963de63b07aa97f7ca8 to your computer and use it in GitHub Desktop.
from sqlalchemy import ForeignKeyConstraint
from sqlalchemy.ext.compiler import compiles
@compiles(ForeignKeyConstraint, 'mysql')
def ignore_foreign_keys_for_mysql(constraint, compiler, **kw):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment