Add default value to theme in user table

This commit is contained in:
Justin Edmund 2022-12-25 16:11:51 -08:00
parent 383d59703f
commit e9dbc36f2a
2 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
class SetDefaultValueToTheme < ActiveRecord::Migration[6.1]
def change
change_column :users, :theme, :string, null: false, default: 'system'
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_12_25_235726) do
ActiveRecord::Schema.define(version: 2022_12_26_000952) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
@ -239,7 +239,7 @@ ActiveRecord::Schema.define(version: 2022_12_25_235726) do
t.boolean "private", default: false, null: false
t.string "element", default: "water", null: false
t.integer "gender", default: 0, null: false
t.string "theme"
t.string "theme", default: "system", null: false
end
create_table "weapon_keys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|