From dfe5645c79f84f4b0ba80262c36fba765f222c7d Mon Sep 17 00:00:00 2001 From: David Lenwell Date: Fri, 1 Nov 2013 21:56:09 -0700 Subject: [PATCH] okay .. really this time.. added relationship --- refstack/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/refstack/models.py b/refstack/models.py index 807ed62e..d0eff77f 100755 --- a/refstack/models.py +++ b/refstack/models.py @@ -86,9 +86,6 @@ class Cloud(Base): __tablename__ = 'cloud' id = Column(Integer, primary_key=True) - user = relationship('User', - backref=backref('clouds',lazy='dynamic')) - label = Column(String(60), unique=False) endpoint = Column(String(120), unique=True) test_user = Column(String(80), unique=False) @@ -97,6 +94,9 @@ class Cloud(Base): admin_user = Column(String(80), unique=False) admin_key = Column(String(80), unique=False) + user_id = Column(Integer, ForeignKey('user.id')) + user = relationship('User', + backref=backref('clouds',lazy='dynamic')) class Test(Base):