Merge branch 'master' into glitch-soc/tentative-merge
Conflicts: README.md app/controllers/statuses_controller.rb app/lib/feed_manager.rb config/navigation.rb spec/lib/feed_manager_spec.rb Conflicts were resolved by taking both versions for each change. This means the two filter systems (glitch-soc's keyword mutes and tootsuite's custom filters) are in place, which will be changed in a follow-up commit.
This commit is contained in:
13
db/migrate/20180628181026_create_custom_filters.rb
Normal file
13
db/migrate/20180628181026_create_custom_filters.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateCustomFilters < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :custom_filters do |t|
|
||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }
|
||||
t.datetime :expires_at
|
||||
t.text :phrase, null: false, default: ''
|
||||
t.string :context, array: true, null: false, default: []
|
||||
t.boolean :irreversible, null: false, default: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
17
db/migrate/20180707154237_add_whole_word_to_custom_filter.rb
Normal file
17
db/migrate/20180707154237_add_whole_word_to_custom_filter.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class AddWholeWordToCustomFilter < ActiveRecord::Migration[5.2]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
safety_assured do
|
||||
add_column_with_default :custom_filters, :whole_word, :boolean, default: true, allow_null: false
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :custom_filters, :whole_word
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user