Generate admin password on db:seed

Test admin account creation in db:seed
This commit is contained in:
2026-04-30 18:23:00 +02:00
parent dedea0246f
commit 3454d3052b
9 changed files with 54 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
class CreateReadouts < ActiveRecord::Migration[7.2]
def change
create_table :readouts do |t|
t.references :user, null: false, foreign_key: true
t.references :user, null: false, foreign_key: {on_delete: :cascade}
t.references :quantity, null: false, foreign_key: true
# :category + :value + :unit as a separate table? (NumericValue, TextValue)
t.integer :category, null: false, default: 0