aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-10-29 09:21:37 -0400
committerRaghuram Subramani <raghus2247@gmail.com>2025-10-29 09:21:37 -0400
commitbd23f60b090535977bf477b038fe5e57f3f1a5e7 (patch)
tree05584de7145d8f5caadc49d22d36f9d4da190a50 /db
parent91e36a2e455d8a69c28794bcc0d994007d5fddbb (diff)
models: client: add uuid
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20251029131932_add_uuid_to_clients.rb5
-rw-r--r--db/schema.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20251029131932_add_uuid_to_clients.rb b/db/migrate/20251029131932_add_uuid_to_clients.rb
new file mode 100644
index 0000000..9542899
--- /dev/null
+++ b/db/migrate/20251029131932_add_uuid_to_clients.rb
@@ -0,0 +1,5 @@
+class AddUuidToClients < ActiveRecord::Migration[8.1]
+ def change
+ add_column :clients, :uuid, :uuid, null: false, default: 'gen_random_uuid()'
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 52a6a4c..b50a3f0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema[8.1].define(version: 2025_10_29_130829) do
+ActiveRecord::Schema[8.1].define(version: 2025_10_29_131932) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
@@ -19,6 +19,7 @@ ActiveRecord::Schema[8.1].define(version: 2025_10_29_130829) do
t.string "first_name", null: false
t.string "last_name", null: false
t.datetime "updated_at", null: false
+ t.uuid "uuid", default: -> { "gen_random_uuid()" }, null: false
end
create_table "sessions", force: :cascade do |t|