diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-31 18:03:08 -0400 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-31 18:03:24 -0400 |
| commit | 6a09193365566e925589134e80cfdbdad0c60be3 (patch) | |
| tree | 5c0ac7031fbbfcac376f983322d1a0b27d7bb032 /db | |
| parent | c8bd4c9d20daebfd4a2a2003bd84b2f656815925 (diff) | |
users: email_address->username
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20251031215930_drop_email_address_and_add_username_to_users.rb | 6 | ||||
| -rw-r--r-- | db/schema.rb | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/db/migrate/20251031215930_drop_email_address_and_add_username_to_users.rb b/db/migrate/20251031215930_drop_email_address_and_add_username_to_users.rb new file mode 100644 index 0000000..e7d199e --- /dev/null +++ b/db/migrate/20251031215930_drop_email_address_and_add_username_to_users.rb @@ -0,0 +1,6 @@ +class DropEmailAddressAndAddUsernameToUsers < ActiveRecord::Migration[8.1] + def change + add_column :users, :username, :string, null: false + remove_column :users, :email_address + end +end diff --git a/db/schema.rb b/db/schema.rb index 34547e1..104a2e9 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_30_173042) do +ActiveRecord::Schema[8.1].define(version: 2025_10_31_215930) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" @@ -49,11 +49,10 @@ ActiveRecord::Schema[8.1].define(version: 2025_10_30_173042) do create_table "users", force: :cascade do |t| t.datetime "created_at", null: false - t.string "email_address", null: false t.string "password_digest", null: false t.integer "role", default: 0, null: false t.datetime "updated_at", null: false - t.index ["email_address"], name: "index_users_on_email_address", unique: true + t.string "username", null: false end create_table "visits", force: :cascade do |t| |
