Skip to content

Commit

Permalink
Add Color Theme column to users
Browse files Browse the repository at this point in the history
  • Loading branch information
Moises Deniz committed Jan 12, 2024
1 parent 0257906 commit f869b7d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/api/app/models/unregistered_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def self.register(opts)
# id :integer not null, primary key
# adminnote :text(65535)
# biography :string(255) default("")
# color_theme :integer default(0), not null
# deprecated_password :string(255) indexed
# deprecated_password_hash_type :string(255)
# deprecated_password_salt :string(255)
Expand Down
1 change: 1 addition & 0 deletions src/api/app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ def hash_string(value)
# id :integer not null, primary key
# adminnote :text(65535)
# biography :string(255) default("")
# color_theme :integer default(0), not null
# deprecated_password :string(255) indexed
# deprecated_password_hash_type :string(255)
# deprecated_password_salt :string(255)
Expand Down
5 changes: 5 additions & 0 deletions src/api/db/migrate/20240111231639_add_theme_to_user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddThemeToUser < ActiveRecord::Migration[7.0]
def change
add_column :users, :color_theme, :integer, default: 0, null: false
end
end
3 changes: 2 additions & 1 deletion src/api/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2023_12_18_151408) do
ActiveRecord::Schema[7.0].define(version: 2024_01_11_231639) do
create_table "appeals", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.text "reason", null: false
t.integer "appellant_id", null: false
Expand Down Expand Up @@ -1125,6 +1125,7 @@
t.boolean "in_rollout", default: true
t.string "biography", default: ""
t.string "rss_secret", limit: 200
t.integer "color_theme", default: 0, null: false
t.index ["deprecated_password"], name: "users_password_index"
t.index ["in_beta"], name: "index_users_on_in_beta"
t.index ["in_rollout"], name: "index_users_on_in_rollout"
Expand Down

0 comments on commit f869b7d

Please sign in to comment.