fix version sort
This commit is contained in:
parent
18cb75f555
commit
e1ffcb609b
@ -7,6 +7,7 @@ ChangeLog
|
||||
0.2.2
|
||||
-----
|
||||
- Fix postgres drop fk.
|
||||
- Fix version sort.
|
||||
|
||||
0.2.1
|
||||
-----
|
||||
|
@ -44,7 +44,10 @@ class Migrate:
|
||||
|
||||
@classmethod
|
||||
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
|
||||
async def get_last_version(cls) -> Aerich:
|
||||
|
Loading…
x
Reference in New Issue
Block a user