Rerun migrate themes script (#15312)

Because of the way the the scripts to run works, there's always
already a script with this file name by the time this starts.

Remove the guard clause and let it run.
This commit is contained in:
Daniel Uber 2021-11-09 10:38:17 -06:00 committed by GitHub
parent 6b2160f307
commit eec738710b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,25 @@
module DataUpdateScripts
class MigrateThemesAgain
def run
# No OS sync for Dark (2) users
Users::Setting
.where(config_theme: 2)
.update_all(prefer_os_color_scheme: false)
# Ten X Hacker (4) -> Dark (2), no OS sync
Users::Setting
.where(config_theme: 4)
.update_all(config_theme: 2, prefer_os_color_scheme: false)
# Minimal (1) -> Light (0), no OS sync
Users::Setting
.where(config_theme: 1)
.update_all(config_theme: 0, prefer_os_color_scheme: false)
# Pink (3) -> Light (0), OS sync (defaults to true), the
Users::Setting
.where(config_theme: 3)
.update_all(config_theme: 0)
end
end
end