Skip to content

Commit 7075bdf

Browse files
committed
Fix import path for existing migrations to allow alembic to create new migrations
1 parent 2058096 commit 7075bdf

4 files changed

+4
-4
lines changed

utils/db_migration/versions/from_0_6_to_1_1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
print("Unable to import alembic (install with `poetry run pip install alembic`)")
3535
sys.exit()
3636

37-
sys.path.append(os.path.join("..", ".."))
37+
sys.path.append(os.path.join("..", "..", ".."))
3838

3939
import lib.cuckoo.core.database as db
4040
from lib.cuckoo.common.config import Config

utils/db_migration/versions/from_1_1_to_1_2-added_states.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
sys.exit()
3535

3636
curdir = os.path.abspath(os.path.dirname(__file__))
37-
sys.path.append(os.path.join(curdir, "..", ".."))
37+
sys.path.append(os.path.join(curdir, "..", "..", ".."))
3838

3939
import lib.cuckoo.core.database as db
4040

utils/db_migration/versions/from_1_1_to_1_2-extend_file_type.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from alembic import op
2323

2424
curdir = os.path.abspath(os.path.dirname(__file__))
25-
sys.path.append(os.path.join(curdir, "..", ".."))
25+
sys.path.append(os.path.join(curdir, "..", "..", ".."))
2626

2727
import lib.cuckoo.core.database as db
2828

utils/db_migration/versions/from_1_2_to_1_2-accuvant-add_statistics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
sys.exit()
3535

3636
curdir = os.path.abspath(os.path.dirname(__file__))
37-
sys.path.append(os.path.join(curdir, "..", ".."))
37+
sys.path.append(os.path.join(curdir, "..", "..", ".."))
3838

3939
import lib.cuckoo.core.database as db
4040

0 commit comments

Comments
 (0)