diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-02 02:30:35 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-02 02:30:35 -0500 |
commit | 65c42e5398304273b54916cc90441ade23317d85 (patch) | |
tree | 466c63aa34c1680c49e66a3c7b0961297f1d8929 /db/migrate | |
parent | 3813810cac8eb138ed1819058d122503628d6cba (diff) |
filters now have options to separately match post text, content warnings/titles, & hashtags + option to filter threads containing a matching post
Diffstat (limited to 'db/migrate')
5 files changed, 26 insertions, 0 deletions
diff --git a/db/migrate/20190801212756_add_thread_to_custom_filters.rb b/db/migrate/20190801212756_add_thread_to_custom_filters.rb new file mode 100644 index 000000000..de2507451 --- /dev/null +++ b/db/migrate/20190801212756_add_thread_to_custom_filters.rb @@ -0,0 +1,5 @@ +class AddThreadToCustomFilters < ActiveRecord::Migration[5.2] + def change + safety_assured { add_column :custom_filters, :thread, :boolean, null: false, default: false } + end +end diff --git a/db/migrate/20190801213117_add_spoiler_to_custom_filters.rb b/db/migrate/20190801213117_add_spoiler_to_custom_filters.rb new file mode 100644 index 000000000..63aba46ac --- /dev/null +++ b/db/migrate/20190801213117_add_spoiler_to_custom_filters.rb @@ -0,0 +1,5 @@ +class AddSpoilerToCustomFilters < ActiveRecord::Migration[5.2] + def change + safety_assured { add_column :custom_filters, :spoiler, :boolean, null: false, default: false } + end +end diff --git a/db/migrate/20190801213606_add_tags_to_custom_filters.rb b/db/migrate/20190801213606_add_tags_to_custom_filters.rb new file mode 100644 index 000000000..4ed1a6e34 --- /dev/null +++ b/db/migrate/20190801213606_add_tags_to_custom_filters.rb @@ -0,0 +1,5 @@ +class AddTagsToCustomFilters < ActiveRecord::Migration[5.2] + def change + safety_assured { add_column :custom_filters, :tags, :boolean, null: false, default: false } + end +end diff --git a/db/migrate/20190801222645_add_status_text_to_custom_filters.rb b/db/migrate/20190801222645_add_status_text_to_custom_filters.rb new file mode 100644 index 000000000..cf4bbd28b --- /dev/null +++ b/db/migrate/20190801222645_add_status_text_to_custom_filters.rb @@ -0,0 +1,5 @@ +class AddStatusTextToCustomFilters < ActiveRecord::Migration[5.2] + def change + safety_assured { add_column :custom_filters, :status_text, :boolean, null: false, default: false } + end +end diff --git a/db/migrate/20190801222823_set_status_text_bool_for_existing_filters.rb b/db/migrate/20190801222823_set_status_text_bool_for_existing_filters.rb new file mode 100644 index 000000000..787c63929 --- /dev/null +++ b/db/migrate/20190801222823_set_status_text_bool_for_existing_filters.rb @@ -0,0 +1,6 @@ +class SetStatusTextBoolForExistingFilters < ActiveRecord::Migration[5.2] + def up + CustomFilter.where(status_text: false).in_batches.update_all(status_text: true) + CustomFilter.where(spoiler_text: false).in_batches.update_all(spoiler_text: true) + end +end |