diff --git a/setup_db.py b/setup_db.py index e247386..075c3cf 100644 --- a/setup_db.py +++ b/setup_db.py @@ -1,14 +1,15 @@ import sqlite3 +import traceback import os import argparse from configparser import ConfigParser from typing import List, Tuple class DBNotFoundError(Exception): - pass + '''Could not find the database location''' class InvalidMigrationError(Exception): - pass + '''Migration file has an invalid name''' def get_migrations() -> List[Tuple[int, str]] | InvalidMigrationError: '''Returns a list of migration files in numeric order.''' @@ -91,6 +92,7 @@ def main(): conn.commit() except Exception as ex: print(f'An error occurred while applying migration: {ex}, aborting...') + print(traceback.format_exc()) conn.rollback() break conn.close()