Add Migration class to hold the path, app name and migration name in one object + adapt existing logic

This commit is contained in:
David-Wobrock committed 2019-01-05 16:59:36 +01:00
1 parent f0021dc139
commit c6df7e53a0
3 files changed
+17 -11

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
from django_migration_linter.utils import split_migration_path
class Migration(object):
def __init__(self, abs_path):
self.abs_path = abs_path
self.app_name, self.name = split_migration_path(self.abs_path)