summaryrefslogtreecommitdiff
path: root/db/migrate/20250823142743_create_beds.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20250823142743_create_beds.rb')
-rw-r--r--db/migrate/20250823142743_create_beds.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20250823142743_create_beds.rb b/db/migrate/20250823142743_create_beds.rb
new file mode 100644
index 0000000..3c23ad7
--- /dev/null
+++ b/db/migrate/20250823142743_create_beds.rb
@@ -0,0 +1,11 @@
+class CreateBeds < ActiveRecord::Migration[8.0]
+ def change
+ create_table :beds do |t|
+ t.integer :location, null: false
+
+ t.timestamps
+ end
+
+ add_index :beds, :location, unique: true
+ end
+end
Copyright 2019--2025 Marius PETER