fix version sort
This commit is contained in:
parent
18cb75f555
commit
e1ffcb609b
@ -7,6 +7,7 @@ ChangeLog
|
|||||||
0.2.2
|
0.2.2
|
||||||
-----
|
-----
|
||||||
- Fix postgres drop fk.
|
- Fix postgres drop fk.
|
||||||
|
- Fix version sort.
|
||||||
|
|
||||||
0.2.1
|
0.2.1
|
||||||
-----
|
-----
|
||||||
|
@ -44,7 +44,10 @@ class Migrate:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_all_version_files(cls) -> List[str]:
|
def get_all_version_files(cls) -> List[str]:
|
||||||
return sorted(filter(lambda x: x.endswith("json"), os.listdir(cls.migrate_location)))
|
return sorted(
|
||||||
|
filter(lambda x: x.endswith("json"), os.listdir(cls.migrate_location)),
|
||||||
|
key=lambda x: x.split("_")[0],
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def get_last_version(cls) -> Aerich:
|
async def get_last_version(cls) -> Aerich:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user