Set constraints on Readouts.user_id foreign key

Add Measurements table
This commit is contained in:
2026-05-05 20:33:21 +02:00
parent 4a36ffc8bf
commit d3a34233b9
10 changed files with 107 additions and 22 deletions

View File

@@ -4,4 +4,6 @@ class Readout < ApplicationRecord
belongs_to :user
belongs_to :quantity
belongs_to :unit
# TODO: validate quantity.user_id == unit.user_id != NULL
end