diff options
author | David Yip <yipdw@member.fsf.org> | 2018-06-03 19:41:54 -0500 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-06-03 23:00:50 -0500 |
commit | 26573ad7e67e64d6db222877cf2853920c2c7dae (patch) | |
tree | 18d16514ea853d20ccb04eef858c7966690ba69c /db | |
parent | 37d495eeeb810127e0c6c62bff865c1ba66f45c8 (diff) |
Thread scopes through #matches?. #454.
Also add an apply_to_mentions attribute on Glitch::KeywordMute, which is used to calculate scope. Next up: additions to the test suite to demonstrate how scoping works.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180604000556_add_apply_to_mentions_flag_to_keyword_mutes.rb | 17 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 19 insertions, 2 deletions
diff --git a/db/migrate/20180604000556_add_apply_to_mentions_flag_to_keyword_mutes.rb b/db/migrate/20180604000556_add_apply_to_mentions_flag_to_keyword_mutes.rb new file mode 100644 index 000000000..cd97d0f20 --- /dev/null +++ b/db/migrate/20180604000556_add_apply_to_mentions_flag_to_keyword_mutes.rb @@ -0,0 +1,17 @@ +require 'mastodon/migration_helpers' + +class AddApplyToMentionsFlagToKeywordMutes < ActiveRecord::Migration[5.2] + include Mastodon::MigrationHelpers + + disable_ddl_transaction! + + def up + safety_assured do + add_column_with_default :glitch_keyword_mutes, :apply_to_mentions, :boolean, allow_null: false, default: true + end + end + + def down + remove_column :glitch_keyword_mutes, :apply_to_mentions + end +end diff --git a/db/schema.rb b/db/schema.rb index 796924123..4f2c00099 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2018_05_28_141303) do +ActiveRecord::Schema.define(version: 2018_06_04_000556) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -206,6 +206,7 @@ ActiveRecord::Schema.define(version: 2018_05_28_141303) do t.boolean "whole_word", default: true, null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.boolean "apply_to_mentions", default: true, null: false t.index ["account_id"], name: "index_glitch_keyword_mutes_on_account_id" end @@ -466,7 +467,6 @@ ActiveRecord::Schema.define(version: 2018_05_28_141303) do t.bigint "application_id" t.bigint "in_reply_to_account_id" t.boolean "local_only" - t.text "full_status_text", default: "", null: false t.index ["account_id", "id", "visibility", "updated_at"], name: "index_statuses_20180106", order: { id: :desc } t.index ["conversation_id"], name: "index_statuses_on_conversation_id" t.index ["in_reply_to_id"], name: "index_statuses_on_in_reply_to_id" |