diff options
author | Marius Peter <marius.peter@tutanota.com> | 2025-08-24 20:29:54 +0200 |
---|---|---|
committer | Marius Peter <marius.peter@tutanota.com> | 2025-08-24 20:29:54 +0200 |
commit | 52b044d6a4278c229992404ad5801769c2d13363 (patch) | |
tree | b30b34da58f26117c035391d09366b190350b1e3 /db/migrate/20250824163242_create_fertilizer_products.rb |
First commit.
Vive le Castel Peter !
Diffstat (limited to 'db/migrate/20250824163242_create_fertilizer_products.rb')
-rw-r--r-- | db/migrate/20250824163242_create_fertilizer_products.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20250824163242_create_fertilizer_products.rb b/db/migrate/20250824163242_create_fertilizer_products.rb new file mode 100644 index 0000000..024f82c --- /dev/null +++ b/db/migrate/20250824163242_create_fertilizer_products.rb @@ -0,0 +1,11 @@ +class CreateFertilizerProducts < ActiveRecord::Migration[8.0] + def change + create_table :fertilizer_products do |t| + t.string :name, null: false + t.decimal :purity, precision: 5, scale: 2, null: false, default: 100.00 + + t.timestamps + end + add_index :fertilizer_products, :name, unique: true + end +end |