summaryrefslogtreecommitdiff
path: root/db/migrate/20250820175742_create_nutrient_measurements.rb
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
commit52b044d6a4278c229992404ad5801769c2d13363 (patch)
treeb30b34da58f26117c035391d09366b190350b1e3 /db/migrate/20250820175742_create_nutrient_measurements.rb
First commit.
Vive le Castel Peter !
Diffstat (limited to 'db/migrate/20250820175742_create_nutrient_measurements.rb')
-rw-r--r--db/migrate/20250820175742_create_nutrient_measurements.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/db/migrate/20250820175742_create_nutrient_measurements.rb b/db/migrate/20250820175742_create_nutrient_measurements.rb
new file mode 100644
index 0000000..b4bae51
--- /dev/null
+++ b/db/migrate/20250820175742_create_nutrient_measurements.rb
@@ -0,0 +1,27 @@
+class CreateNutrientMeasurements < ActiveRecord::Migration[8.0]
+ def change
+ create_table :nutrient_measurements do |t|
+ t.date :measured_on
+ t.float :nno3
+ t.float :p
+ t.float :k
+ t.float :ca
+ t.float :mg
+ t.float :s
+ t.float :na
+ t.float :cl
+ t.float :si
+ t.float :fe
+ t.float :zn
+ t.float :b
+ t.float :mn
+ t.float :cu
+ t.float :mo
+ t.float :nnh4
+
+ t.timestamps
+ end
+
+ add_index :nutrient_measurements, :measured_on, unique: true
+ end
+end
Copyright 2019--2025 Marius PETER