22 lines
488 B
Python
22 lines
488 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from app.config import get_settings
|
||
|
|
from scripts.app_db_adopt import adopt_or_initialize_app_db
|
||
|
|
|
||
|
|
|
||
|
|
def run_all_migrations() -> dict[str, str]:
|
||
|
|
settings = get_settings()
|
||
|
|
return {
|
||
|
|
"app": adopt_or_initialize_app_db(settings.app_database_url),
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
def main() -> None:
|
||
|
|
results = run_all_migrations()
|
||
|
|
for database_name, result in results.items():
|
||
|
|
print(f"{database_name}: {result}")
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
main()
|