add username
This commit is contained in:
parent
56fd287b0f
commit
385441486e
2 changed files with 9 additions and 1 deletions
7
db/migrate/20260211102848_add_username_to_users.rb
Normal file
7
db/migrate/20260211102848_add_username_to_users.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
class AddUsernameToUsers < ActiveRecord::Migration[8.0]
|
||||||
|
def up
|
||||||
|
add_column :users, :username, :string
|
||||||
|
User.update_all(username: "temporary")
|
||||||
|
change_column_null :users, :username, false
|
||||||
|
end
|
||||||
|
end
|
||||||
3
db/schema.rb
generated
3
db/schema.rb
generated
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[8.0].define(version: 2026_01_27_150339) do
|
ActiveRecord::Schema[8.0].define(version: 2026_02_11_102848) do
|
||||||
create_table "moods", force: :cascade do |t|
|
create_table "moods", force: :cascade do |t|
|
||||||
t.string "mode"
|
t.string "mode"
|
||||||
t.datetime "recorded_at"
|
t.datetime "recorded_at"
|
||||||
|
|
@ -46,6 +46,7 @@ ActiveRecord::Schema[8.0].define(version: 2026_01_27_150339) do
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.datetime "invitation_accepted_at"
|
t.datetime "invitation_accepted_at"
|
||||||
|
t.string "username", null: false
|
||||||
t.index ["email_address"], name: "index_users_on_email_address", unique: true
|
t.index ["email_address"], name: "index_users_on_email_address", unique: true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue