models Enum type fix

This commit is contained in:
pycook
2016-04-27 17:38:21 +08:00
committed by pycook
parent 60233101ed
commit 99870b33de
6 changed files with 10 additions and 14 deletions

View File

@@ -18,8 +18,8 @@ class CIRelation(db.Model):
second_ci = db.relationship(
"CI", primaryjoin="CI.ci_id==CIRelation.second_ci_id")
relation_type = db.Column(
db.String(8), db.Enum("connect", "deploy", "install", "contain",
name="relation_type"), nullable=False)
db.Enum("connect", "deploy", "install", "contain",
name="relation_type"), nullable=False)
more = db.Column(db.Integer, db.ForeignKey("cis.ci_id"))
__table_args__ = (db.UniqueConstraint("first_ci_id", "second_ci_id",