Added new spam_flag to Accounts, replacing is_flagged_as_spam

• Added:
- new spam_flag to Accounts, replacing is_flagged_as_spam
- null/0: no spam, 1: spam, 2: safe from spam

• Updated:
- Comment, Status to reflect changes

• Todo:
- Fully remove is_flagged_as_spam
- Update SortingQueryBuilder
This commit is contained in:
Developer
2021-02-18 23:46:53 -05:00
parent bf1d00b5f8
commit 2a8ca2cd56
13 changed files with 34 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
class AddSpamFlagToAccounts < ActiveRecord::Migration[6.0]
def change
add_column :accounts, :spam_flag, :integer, null: true
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_02_16_022902) do
ActiveRecord::Schema.define(version: 2021_02_18_235403) do
# These are extensions that must be enabled in order to support this database
enable_extension "mongo_fdw"
@@ -143,6 +143,7 @@ ActiveRecord::Schema.define(version: 2021_02_16_022902) do
t.boolean "is_donor", default: false, null: false
t.boolean "is_investor", default: false, null: false
t.boolean "is_flagged_as_spam", default: false, null: false
t.integer "spam_flag"
t.index "(((setweight(to_tsvector('simple'::regconfig, (display_name)::text), 'A'::\"char\") || setweight(to_tsvector('simple'::regconfig, (username)::text), 'B'::\"char\")) || setweight(to_tsvector('simple'::regconfig, (COALESCE(domain, ''::character varying))::text), 'C'::\"char\")))", name: "search_index", using: :gin
t.index "lower((username)::text), lower((domain)::text)", name: "index_accounts_on_username_and_domain_lower", unique: true
t.index ["domain"], name: "index_accounts_on_domain"