added user relationship to cloud ..

for some reason I skipped that when I rebuilt the models
This commit is contained in:
David Lenwell 2013-11-01 21:52:39 -07:00
parent d0ea12b950
commit 8a86aa8014
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,26 @@
"""added user - cloud relationship
Revision ID: 4288db006e5
Revises: 1d6540fc6279
Create Date: 2013-10-31 21:00:27.473833
"""
# revision identifiers, used by Alembic.
revision = '4288db006e5'
down_revision = '1d6540fc6279'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
pass
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
pass
### end Alembic commands ###

View File

@ -86,6 +86,9 @@ class Cloud(Base):
__tablename__ = 'cloud' __tablename__ = 'cloud'
id = Column(Integer, primary_key=True) id = Column(Integer, primary_key=True)
user = relationship('User',
backref=backref('clouds',lazy='dynamic'))
label = Column(String(60), unique=False) label = Column(String(60), unique=False)
endpoint = Column(String(120), unique=True) endpoint = Column(String(120), unique=True)
test_user = Column(String(80), unique=False) test_user = Column(String(80), unique=False)