diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-11-04 12:02:04 +0100 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-11-28 14:46:07 +0100 |
commit | 53d0293d259f3b4e8fcfd96aca33867c6af3dd50 (patch) | |
tree | 35532d46eda0fb8058197d8aae05147499d44ae5 /db/migrate | |
parent | 74a281475a96be66bfa6a14ed9108f41ac451856 (diff) |
Add database support for list show-reply preferences
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20181127165847_add_show_replies_to_lists.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20181127165847_add_show_replies_to_lists.rb b/db/migrate/20181127165847_add_show_replies_to_lists.rb new file mode 100644 index 000000000..f68c98daf --- /dev/null +++ b/db/migrate/20181127165847_add_show_replies_to_lists.rb @@ -0,0 +1,23 @@ +require Rails.root.join('lib', 'mastodon', 'migration_helpers') + +class AddShowRepliesToLists < ActiveRecord::Migration[5.2] + include Mastodon::MigrationHelpers + + disable_ddl_transaction! + + def up + safety_assured do + add_column_with_default( + :lists, + :replies_policy, + :integer, + allow_null: false, + default: 0 + ) + end + end + + def down + remove_column :lists, :replies_policy + end +end |