use mode reference for rfid tags
This commit is contained in:
parent
dacd850493
commit
c663ee1136
2 changed files with 9 additions and 2 deletions
|
|
@ -0,0 +1,6 @@
|
|||
class UpdateRfidTagsModeFromStringToMode < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
remove_column :rfid_tags, :mode
|
||||
add_reference :rfid_tags, :mode
|
||||
end
|
||||
end
|
||||
5
db/schema.rb
generated
5
db/schema.rb
generated
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_03_19_181607) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_07_29_144217) do
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
|
|
@ -70,12 +70,13 @@ ActiveRecord::Schema[8.0].define(version: 2026_03_19_181607) do
|
|||
|
||||
create_table "rfid_tags", force: :cascade do |t|
|
||||
t.string "identifier"
|
||||
t.string "mode"
|
||||
t.datetime "created_at", default: -> { "CURRENT_DATE" }, null: false
|
||||
t.datetime "updated_at", default: -> { "CURRENT_DATE" }, null: false
|
||||
t.string "chip_id"
|
||||
t.integer "user_id"
|
||||
t.integer "mode_id"
|
||||
t.index ["identifier"], name: "index_rfid_tags_on_identifier", unique: true
|
||||
t.index ["mode_id"], name: "index_rfid_tags_on_mode_id"
|
||||
t.index ["user_id"], name: "index_rfid_tags_on_user_id"
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue