diff options
| -rw-r--r-- | app/models/client.rb | 2 | ||||
| -rw-r--r-- | db/migrate/20251029005839_create_clients.rb | 10 | ||||
| -rw-r--r-- | db/schema.rb | 9 |
3 files changed, 20 insertions, 1 deletions
diff --git a/app/models/client.rb b/app/models/client.rb new file mode 100644 index 0000000..45b2363 --- /dev/null +++ b/app/models/client.rb @@ -0,0 +1,2 @@ +class Client < ApplicationRecord +end diff --git a/db/migrate/20251029005839_create_clients.rb b/db/migrate/20251029005839_create_clients.rb new file mode 100644 index 0000000..a6690b6 --- /dev/null +++ b/db/migrate/20251029005839_create_clients.rb @@ -0,0 +1,10 @@ +class CreateClients < ActiveRecord::Migration[8.1] + def change + create_table :clients do |t| + t.string :first_name, null: false + t.string :last_name, null: false + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 77c9795..fc12b56 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,10 +10,17 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.1].define(version: 2025_10_29_004409) do +ActiveRecord::Schema[8.1].define(version: 2025_10_29_005839) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" + create_table "clients", force: :cascade do |t| + t.datetime "created_at", null: false + t.string "first_name", null: false + t.string "last_name", null: false + t.datetime "updated_at", null: false + end + create_table "sessions", force: :cascade do |t| t.datetime "created_at", null: false t.string "ip_address" |
