Added 'project' column to node table

Without a 'project' table, we cannot tell which project a node belongs
to.
This commit is contained in:
tengqm
2015-02-27 19:01:30 +08:00
parent 2d0df79f1d
commit c9654b1294
2 changed files with 2 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ def upgrade(migrate_engine):
sqlalchemy.Column('profile_id', sqlalchemy.String(36),
sqlalchemy.ForeignKey('profile.id'),
nullable=False),
sqlalchemy.Column('project', sqlalchemy.String(36)),
sqlalchemy.Column('index', sqlalchemy.Integer),
sqlalchemy.Column('role', sqlalchemy.String(64)),
sqlalchemy.Column('init_time', sqlalchemy.DateTime),

View File

@@ -126,6 +126,7 @@ class Node(BASE, SenlinBase, SoftDelete):
sqlalchemy.ForeignKey('cluster.id'))
profile_id = sqlalchemy.Column(sqlalchemy.String(36),
sqlalchemy.ForeignKey('profile.id'))
project = sqlalchemy.Column(sqlalchemy.String(36))
index = sqlalchemy.Column(sqlalchemy.Integer)
role = sqlalchemy.Column(sqlalchemy.String(64))