forked from 3wordchant/capsul-flask
metrics are working!!!
This commit is contained in:
@ -27,7 +27,11 @@ def init_app(app):
|
||||
schemaMigrationsPath = join(app.root_path, 'schema_migrations')
|
||||
print("loading schema migration scripts from {}".format(schemaMigrationsPath))
|
||||
for filename in listdir(schemaMigrationsPath):
|
||||
key = re.search(r"^\d+_(up|down)", filename).group()
|
||||
result = re.search(r"^\d+_(up|down)", filename)
|
||||
if not result:
|
||||
print(f"schemaVersion {filename} must match ^\d+_(up|down). exiting.")
|
||||
exit(1)
|
||||
key = result.group()
|
||||
with open(join(schemaMigrationsPath, filename), 'rb') as file:
|
||||
schemaMigrations[key] = file.read().decode("utf8")
|
||||
|
||||
|
Reference in New Issue
Block a user