summaryrefslogtreecommitdiff
path: root/db/seed.rkt
diff options
context:
space:
mode:
authorMarius Peter <dev@marius-peter.com>2025-11-17 17:22:30 +0100
committerMarius Peter <dev@marius-peter.com>2025-11-17 17:22:30 +0100
commit93ebb58edd71ced82500731e3b5b49a339d95f11 (patch)
tree054724e3c1357d67c1e8bc4c7922cdd0ef2e35ca /db/seed.rkt
parent38edbdd0a6e7713be3b951073b82cab06fbf5d25 (diff)
seed-sequence must appear after defining all seeding functions.
Diffstat (limited to 'db/seed.rkt')
-rw-r--r--db/seed.rkt15
1 files changed, 7 insertions, 8 deletions
diff --git a/db/seed.rkt b/db/seed.rkt
index f85cd5d..4a765f6 100644
--- a/db/seed.rkt
+++ b/db/seed.rkt
@@ -17,14 +17,6 @@
(seed-function)
(displayln (format "Seeded entity: ~a" entity))))
-(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!)))
-
(define (seed-nutrients!)
(define nutrient-names (map nutrient-name (get-nutrients)))
(define default-nutrients
@@ -126,6 +118,13 @@
(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)
Copyright 2019--2026 Marius PETER