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:
parent
21849625b2
commit
5f4c089625
@ -18,6 +18,7 @@ def run_pgmigrate(migr_dir, args):
|
|||||||
stdout, stderr = p.communicate()
|
stdout, stderr = p.communicate()
|
||||||
return p.returncode, str(stdout), str(stderr)
|
return p.returncode, str(stdout), str(stderr)
|
||||||
|
|
||||||
|
|
||||||
@given('successful pgmigrate run with "{args}"')
|
@given('successful pgmigrate run with "{args}"')
|
||||||
def step_impl(context, args):
|
def step_impl(context, args):
|
||||||
if context.migrate_config:
|
if context.migrate_config:
|
||||||
|
@ -33,7 +33,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from builtins import str as text
|
from builtins import str as text
|
||||||
from collections import namedtuple
|
from collections import OrderedDict, namedtuple
|
||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import sqlparse
|
import sqlparse
|
||||||
@ -219,7 +219,11 @@ def _get_info(base_dir, baseline_v, target_v, cursor):
|
|||||||
if num not in ret:
|
if num not in ret:
|
||||||
ret[num] = migrations_info[version]
|
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):
|
def _get_state(base_dir, baseline_v, target, cursor):
|
||||||
|
Loading…
Reference in New Issue
Block a user