We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
migrations.py
1 parent e334edb commit b8fe19dCopy full SHA for b8fe19d
migration.py
@@ -1,23 +1,26 @@
1
-models = []
+from typing import Callable
2
3
4
-def up():
+models: list = []
5
+
6
7
+def up() -> None:
8
for model in models:
9
print(f'🛠️\tCreating a table for {model.table_name}...')
10
model.up()
11
12
print('✅\tMigration is complete', end='\n\n')
13
14
-def down():
15
+def down() -> None:
16
for model in reversed(models):
17
print(f'🗑️\tDeleting a table with {model.table_name}...')
18
model.down()
19
20
print('✅\tRollback is complete', end='\n\n')
21
22
-def reset():
23
+def reset() -> None:
24
down()
25
up()
26
0 commit comments