Added some models
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled

User
Item
Department
Categorie
AssignmentLog
Room
This commit is contained in:
2026-05-21 15:36:23 +02:00
parent 7b02520b6c
commit b7f0c35378
27 changed files with 387 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
class CreateItems < ActiveRecord::Migration[8.1]
def change
create_table :items do |t|
t.string :name
t.string :sku
t.string :sticker_id
t.string :serial_number
t.decimal :price, precision: 8, scale: 2
t.text :notes
t.references :category, foreign_key: true
t.references :user, foreign_key: true
t.references :room, foreign_key: true
t.timestamps
end
add_index :items, :sticker_id, unique: true
add_index :items, :serial_number, unique: true
end
end