diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 15:09:34 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 15:09:34 +0200 |
commit | 8cad1c9f4c2984c0a73627290b5e7c6b465a68c2 (patch) | |
tree | c4bbafdfa67b529fcb52a4580240790b4a493b55 /db | |
parent | 7799b5bda6ba0a65c5a951dfd72db4fe334dc70e (diff) | |
download | gitlab-ce-8cad1c9f4c2984c0a73627290b5e7c6b465a68c2.tar.gz |
add dark solarized theme for code preview
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20130315124931_user_color_scheme.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/db/migrate/20130315124931_user_color_scheme.rb b/db/migrate/20130315124931_user_color_scheme.rb new file mode 100644 index 00000000000..fe139e32ea7 --- /dev/null +++ b/db/migrate/20130315124931_user_color_scheme.rb @@ -0,0 +1,12 @@ +class UserColorScheme < ActiveRecord::Migration + def up + add_column :users, :color_scheme_id, :integer, null: false, default: 1 + User.where(dark_scheme: true).update_all(color_scheme_id: 2) + remove_column :users, :dark_scheme + end + + def down + add_column :users, :dark_scheme, :boolean, null: false, default: false + remove_column :users, :color_scheme_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 2250f418bdd..80c61a4fd6a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130304105317) do +ActiveRecord::Schema.define(:version => 20130315124931) do create_table "events", :force => true do |t| t.string "target_type" @@ -258,7 +258,6 @@ ActiveRecord::Schema.define(:version => 20130304105317) do t.string "linkedin", :default => "", :null => false t.string "twitter", :default => "", :null => false t.string "authentication_token" - t.boolean "dark_scheme", :default => false, :null => false t.integer "theme_id", :default => 1, :null => false t.string "bio" t.integer "failed_attempts", :default => 0 @@ -269,6 +268,7 @@ ActiveRecord::Schema.define(:version => 20130304105317) do t.boolean "can_create_group", :default => true, :null => false t.boolean "can_create_team", :default => true, :null => false t.string "state" + t.integer "color_scheme_id", :default => 1, :null => false end add_index "users", ["admin"], :name => "index_users_on_admin" |