From 13b838052734b1bc19225519eb40c0043b8240c8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 15 Jul 2020 22:15:11 -0500 Subject: [PATCH] Declare foreign key for CustData.member_type --- corepos/db/office_op/model.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/corepos/db/office_op/model.py b/corepos/db/office_op/model.py index 400c4a6..3684d39 100644 --- a/corepos/db/office_op/model.py +++ b/corepos/db/office_op/model.py @@ -907,6 +907,9 @@ class CustData(Base): https://github.com/CORE-POS/IS4C/blob/master/fannie/classlib2.0/data/models/op/CustdataModel.php """ __tablename__ = 'custdata' + __table_args__ = ( + sa.ForeignKeyConstraint(['memType'], ['memtype.memtype']), + ) id = sa.Column(sa.Integer(), primary_key=True, autoincrement=True, nullable=False)