1
1
mirror of https://github.com/yandex/pgmigrate.git synced 2024-09-19 16:17:24 +03:00

info command output now ordered

This commit is contained in:
Vadim Bahmatovich 2017-03-30 15:10:00 +03:00
parent 21849625b2
commit 5f4c089625
2 changed files with 7 additions and 2 deletions

View File

@ -18,6 +18,7 @@ def run_pgmigrate(migr_dir, args):
stdout, stderr = p.communicate()
return p.returncode, str(stdout), str(stderr)
@given('successful pgmigrate run with "{args}"')
def step_impl(context, args):
if context.migrate_config:

View File

@ -33,7 +33,7 @@ import os
import re
import sys
from builtins import str as text
from collections import namedtuple
from collections import OrderedDict, namedtuple
import psycopg2
import sqlparse
@ -219,7 +219,11 @@ def _get_info(base_dir, baseline_v, target_v, cursor):
if num not in ret:
ret[num] = migrations_info[version]
return ret
orderedret = OrderedDict()
for version in sorted(ret, key=int):
orderedret[version] = ret[version]
return orderedret
def _get_state(base_dir, baseline_v, target, cursor):