summaryrefslogtreecommitdiff
path: root/db/migrate/20250823142743_create_beds.rb
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
commit52b044d6a4278c229992404ad5801769c2d13363 (patch)
treeb30b34da58f26117c035391d09366b190350b1e3 /db/migrate/20250823142743_create_beds.rb
First commit.
Vive le Castel Peter !
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