Commit Graph

6 Commits

Author SHA1 Message Date
fd9d2b791a Add default Body weight quantity to seeds
Introduces db/seeds/quantities.rb with a default "Body weight" quantity
(user_id nil = system default), mirroring the pattern used by seeds/units.rb.
Wires it into db/seeds.rb so it runs on db:seed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 08:42:13 +00:00
80130fb7d1 Allow cascade delete Unit/Quantity
Closes #32
2026-02-22 17:50:43 +01:00
5fff9adf4d Delete Units respecting foreign key constraint 2025-01-16 20:46:22 +01:00
0dc683da4f Initialize units hash before use 2025-01-11 21:53:02 +01:00
3788f1a749 Fix db:seed:export task
* replace variable names with Hash to avoid invalid Ruby identifiers
* export all values as single-quoted to avoid string interpolation and
  treating BigDecimal numbers as Float
* #truncate table instead of #delete_all to avoid foreing_key
  constraints errors

Closes #56
2025-01-05 21:05:47 +01:00
2e4eb3d4b5 Rake task to export default settings as seeds 2024-12-06 01:17:05 +01:00