Commit 4eec351 1 parent bdc3ea6 commit 4eec351 Copy full SHA for 4eec351
File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change
1
+ import logging
1
2
import os
2
3
3
4
from flux .config import FluxConfig
6
7
from flux .migration .migration import Migration
7
8
from flux .migration .temporary_module import temporary_module
8
9
10
+ logger = logging .getLogger (__name__ )
11
+
9
12
10
13
def read_migrations (* , config : FluxConfig ) -> list [Migration ]:
11
14
"""
@@ -39,6 +42,9 @@ def _read_repeatable_migrations(
39
42
"""
40
43
migrations = []
41
44
migrations_dir = os .path .join (config .migration_directory , migration_subdir )
45
+ if not os .path .exists (migrations_dir ):
46
+ logger .warning (f"No repeatable migrations directory { migrations_dir !r} " )
47
+ return []
42
48
for migration_file in os .listdir (migrations_dir ):
43
49
if migration_file .endswith (".sql" ):
44
50
migration_id = migration_file [:- 4 ]
You can’t perform that action at this time.
0 commit comments