Fix the alembic version returned if there is no active data migration

This commit is contained in:
Joseph Schorr 2019-11-15 13:12:20 -05:00
parent 2e3457ae76
commit 9834bddae6

View file

@ -10,6 +10,9 @@ else:
elif v3_upgrade_mode == 'production-transition': elif v3_upgrade_mode == 'production-transition':
print '481623ba00ba' print '481623ba00ba'
elif v3_upgrade_mode == 'post-oci-rollout' or v3_upgrade_mode == 'post-oci-roll-back-compat' or v3_upgrade_mode == 'complete': elif v3_upgrade_mode == 'post-oci-rollout' or v3_upgrade_mode == 'post-oci-roll-back-compat' or v3_upgrade_mode == 'complete':
print ActiveDataMigration.alembic_migration_revision if ActiveDataMigration is not None:
print ActiveDataMigration.alembic_migration_revision
else:
print 'head'
else: else:
raise Exception('Unknown V3_UPGRADE_MODE: %s' % v3_upgrade_mode) raise Exception('Unknown V3_UPGRADE_MODE: %s' % v3_upgrade_mode)