diff options
| author | Marius Peter <dev@marius-peter.com> | 2025-11-22 18:32:40 +0100 |
|---|---|---|
| committer | Marius Peter <dev@marius-peter.com> | 2025-11-22 18:32:40 +0100 |
| commit | 7af921010521b1108144c85259dae4e435a78262 (patch) | |
| tree | 87986450177e198ca77c87d0d47e9db1a0dd86ba | |
| parent | 09e2b04a7b469daa4b8b6fd89b88ae800d612fd6 (diff) | |
Remove superfluous debugging printing.
| -rw-r--r-- | db/conn.rkt | 8 | ||||
| -rw-r--r-- | db/migrations.rkt | 10 |
2 files changed, 5 insertions, 13 deletions
diff --git a/db/conn.rkt b/db/conn.rkt index 2208e54..42a75c0 100644 --- a/db/conn.rkt +++ b/db/conn.rkt @@ -11,15 +11,11 @@ (define current-conn (make-parameter #f)) (define (connect! #:path [path 'memory]) - (cond - [(connection? (current-conn)) (printf "Database connection already exists: ~e\n" (current-conn))] - [else - (current-conn (sqlite3-connect #:database path #:mode 'create)) - (printf "Connected to database: ~a\n" path)])) + (unless (connection? (current-conn)) + (current-conn (sqlite3-connect #:database path #:mode 'create)))) (define (disconnect!) (disconnect (current-conn)) - (printf "Closing database connection: ~e\n" (current-conn)) (current-conn #f)) (define-syntax-rule (with-db body ...) diff --git a/db/migrations.rkt b/db/migrations.rkt index 0147210..dfa5c43 100644 --- a/db/migrations.rkt +++ b/db/migrations.rkt @@ -9,14 +9,10 @@ (define migrations-box (box '())) (define (migrate-all!) - (printf "Applying migrations on connection ~a...\n" - (dbsystem-name (connection-dbsystem (current-conn)))) (for ([pair (in-list (unbox migrations-box))]) - (match pair - [(cons migration-name stmts) - (with-tx (for ([stmt (in-list stmts)]) - (query-exec (current-conn) stmt))) - (printf "Applied migration: ~a\n" migration-name)]))) + (match-define (cons migration-name stmts) pair) + (with-tx (for ([stmt (in-list stmts)]) + (query-exec (current-conn) stmt))))) (define-syntax-rule (define-migration migration-name sql) (let ([migrations (unbox migrations-box)] |