diff options
| -rw-r--r-- | db/migrate/20251029131932_add_uuid_to_clients.rb | 5 | ||||
| -rw-r--r-- | db/schema.rb | 3 |
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| |
