I have a table which i have changed the Engine from Myisam to InnoDB, This is the only table that has been changed, there are other tables that are in relation with this table of 1:N
class Signals(Base, sql_functions): __tablename__ = 'Signals' def __init__(self, message_id=None, clip_id=None, signal_id=None): self.message_id = message_id self.clip_id = clip_id self.signal_id = signal_id __table_args__ = { 'mysql_engine': 'InnoDB', 'mysql_charset': 'utf8' } __mapper_args__= {'always_refresh': True} id = Column(Integer(10), primary_key=True) message_id = Column(Integer(10), ForeignKey('Messages.id')) clip_id = Column(Integer(10), ForeignKey('Clips.id')) signal_id = Column(Integer(10), ForeignKey('Signal_names.id'), primary_key=True) sig_name = relationship("SignalNames", backref=backref('Signals', order_by=id), primaryjoin = 'Signals.signal_id == SignalNames.id', foreign_keys = 'SignalNames.id') clips = relationship("Clips", backref=backref('Signals', order_by=id), primaryjoin = 'Signals.clip_id == Clips.id', foreign_keys = 'Clips.id') messages = relationship("Messages", backref=backref('Signals', order_by=id), primaryjoin = 'Signals.message_id == Messages.id', foreign_keys = 'Messages.id') def __repr__(self): return "<Signals ('%s %s %s')>" % (self.message_id, self.clip_id) Index('idx_msg_id', Signals.message_id) The problem is that since I have changed the Engine to InnoDB the foreignKey are being created which is undesired, the problem is that Sqlalchemy is using the foreignKey definition in the Column for defining the Join queries and this definition cannot be dropped. Is there a way to prevent the creation of the FK? or defining the relationships without the adding the foreignKey? -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.