Merge "Offline migration support for postgresql"
This commit is contained in:
commit
262e61a02e
|
@ -141,6 +141,13 @@ class DbCommands(object):
|
||||||
|
|
||||||
@args('--version', metavar='<version>', help='Database version')
|
@args('--version', metavar='<version>', help='Database version')
|
||||||
def sync(self, version=None):
|
def sync(self, version=None):
|
||||||
|
engine = db_api.get_engine().engine
|
||||||
|
if engine.name == 'postgresql':
|
||||||
|
if version is None:
|
||||||
|
version = db_migration.LATEST_REVISION
|
||||||
|
self._sync(version)
|
||||||
|
return
|
||||||
|
|
||||||
curr_heads = alembic_migrations.get_current_alembic_heads()
|
curr_heads = alembic_migrations.get_current_alembic_heads()
|
||||||
contract = alembic_migrations.get_alembic_branch_head(
|
contract = alembic_migrations.get_alembic_branch_head(
|
||||||
db_migration.CONTRACT_BRANCH)
|
db_migration.CONTRACT_BRANCH)
|
||||||
|
|
Loading…
Reference in New Issue