From 0e23a5aba9497bba1bb758d61f32e7a3c07088a6 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Sat, 22 Nov 2025 18:41:42 +0100 Subject: Remove superfluous debugging printing from seed module. --- db/seed.rkt | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'db/seed.rkt') 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) -- cgit v1.2.3