diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 17:09:34 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-15 17:09:34 +0400 |
commit | 8cad1c9f4c2984c0a73627290b5e7c6b465a68c2 (patch) | |
tree | c4bbafdfa67b529fcb52a4580240790b4a493b55 /db/migrate/20130315124931_user_color_scheme.rb | |
parent | 7799b5bda6ba0a65c5a951dfd72db4fe334dc70e (diff) |
add dark solarized theme for code preview
Diffstat (limited to 'db/migrate/20130315124931_user_color_scheme.rb')
-rw-r--r-- | db/migrate/20130315124931_user_color_scheme.rb | 12 |
1 files changed, 12 insertions, 0 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 |