mirror of
https://github.com/discourse/discourse.git
synced 2026-07-29 15:54:48 -05:00
Add rubocop to our build. (#5004)
This commit is contained in:
@@ -20,16 +20,15 @@ class AddThemes < ActiveRecord::Migration
|
||||
remove_column :color_schemes, :versioned_id
|
||||
|
||||
enabled_theme_count = execute("SELECT count(*) FROM themes WHERE enabled")
|
||||
.to_a[0]["count"].to_i
|
||||
|
||||
.to_a[0]["count"].to_i
|
||||
|
||||
enabled_scheme_id = execute("SELECT id FROM color_schemes WHERE enabled")
|
||||
.to_a[0]&.fetch("id")
|
||||
.to_a[0]&.fetch("id")
|
||||
|
||||
theme_key, theme_id =
|
||||
execute("SELECT key, id FROM themes WHERE enabled").to_a[0]&.values
|
||||
|
||||
if (enabled_theme_count == 0 && enabled_scheme_id) || enabled_theme_count > 1
|
||||
if (enabled_theme_count == 0 && enabled_scheme_id) || enabled_theme_count > 1
|
||||
|
||||
puts "Creating a new default theme!"
|
||||
|
||||
@@ -67,8 +66,6 @@ SQL
|
||||
execute(sql)
|
||||
end
|
||||
|
||||
|
||||
|
||||
remove_column :themes, :enabled
|
||||
remove_column :color_schemes, :enabled
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user