diff options
| author | Marius Peter <dev@marius-peter.com> | 2025-11-22 18:41:42 +0100 |
|---|---|---|
| committer | Marius Peter <dev@marius-peter.com> | 2025-11-22 18:41:42 +0100 |
| commit | 0e23a5aba9497bba1bb758d61f32e7a3c07088a6 (patch) | |
| tree | 62cfe36a206cfd14cc8165e891ee054fb32e31ee | |
| parent | 708f0e0ba2fd7e7592ea20b1be35b7932b94f7aa (diff) | |
Remove superfluous debugging printing from seed module.
| -rw-r--r-- | db/seed.rkt | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/db/seed.rkt b/db/seed.rkt index 2d9f00b..9693e89 100644 --- a/db/seed.rkt +++ b/db/seed.rkt @@ -12,10 +12,15 @@ "../models/fertilizer-product.rkt") (define (seed-database!) - (for ([phase (in-list seed-sequence)]) - (match-define (cons entity seed-function) phase) - (seed-function) - (displayln (format "Seeded entity: ~a" entity)))) + (for ([seed-function (in-list (seed-sequence))]) + (seed-function))) + +(define (seed-sequence) + (list seed-nutrients! + seed-historical-nutrient-measurements! + seed-crops! + seed-crop-requirements! + seed-existing-fertilizer-products!)) (define (seed-nutrients!) (define nutrient-names (map nutrient-name (get-nutrients))) @@ -102,13 +107,6 @@ (create-fertilizer-product! canonical-name brand-name nutrient-values)) (with-tx (csv-for-each row->seed! next-row))) -(define seed-sequence - (list (cons "nutrients" seed-nutrients!) - (cons "nutrient measurements" seed-historical-nutrient-measurements!) - (cons "crops" seed-crops!) - (cons "crop requirements" seed-crop-requirements!) - (cons "fertilizer products" seed-existing-fertilizer-products!))) - (module+ test (require "migrations.rkt") (connect! #:path 'memory) |