update migrator (#2988)

update

update
This commit is contained in:
Yan 2017-08-22 15:47:53 +08:00 committed by GitHub
parent 749435ccf3
commit c54f55bdff
2 changed files with 9 additions and 2 deletions

View File

@ -69,9 +69,11 @@ def upgrade():
ImageScanJob.__table__.create(bind)
ImageScanOverview.__table__.create(bind)
ClairVulnTimestamp.__table__.create(bind)
session.commit()
def downgrade():
"""
Downgrade has been disabled.
"""
pass
pass

View File

@ -89,8 +89,13 @@ up|upgrade)
mysql $DBCNF -e "insert into registry.alembic_version values ('0.1.1')"
fi
fi
alembic -c ./alembic.ini current
alembic -c ./alembic.ini upgrade ${VERSION}
rc="$?"
alembic -c ./alembic.ini current
echo "Upgrade performed."
echo $rc
exit $rc
;;
backup)
echo "Performing backup..."