From cd3254e170ae1e98523f9f44eaf304c319cd3138 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 8 Oct 2020 11:24:47 +1100 Subject: [PATCH] DEV: remove legacy code This code is a no-op on all sites, even though it looks rather dangerous this migration has long run prior to people trying exploit it. That said ... hygiene here ... is not good. Remove this legacy, we do not want it, even in historical migrations. --- db/migrate/20120803191426_add_admin_flag_to_users.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/db/migrate/20120803191426_add_admin_flag_to_users.rb b/db/migrate/20120803191426_add_admin_flag_to_users.rb index 0e0908a8176..67e5f532d0e 100644 --- a/db/migrate/20120803191426_add_admin_flag_to_users.rb +++ b/db/migrate/20120803191426_add_admin_flag_to_users.rb @@ -4,8 +4,5 @@ class AddAdminFlagToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :admin, :boolean, default: false, null: false add_column :users, :moderator, :boolean, default: false, null: false - - # Make all of us admins - execute "UPDATE users SET admin = TRUE where lower(username) in ('eviltrout', 'codinghorror', 'sam', 'hanzo')" end end