about summary refs log tree commit diff
path: root/db/migrate/20200923000003_add_reblogs_flag_to_lists.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200923000003_add_reblogs_flag_to_lists.rb')
-rw-r--r--db/migrate/20200923000003_add_reblogs_flag_to_lists.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20200923000003_add_reblogs_flag_to_lists.rb b/db/migrate/20200923000003_add_reblogs_flag_to_lists.rb
new file mode 100644
index 000000000..bb6bcc6c2
--- /dev/null
+++ b/db/migrate/20200923000003_add_reblogs_flag_to_lists.rb
@@ -0,0 +1,8 @@
+class AddReblogsFlagToLists < ActiveRecord::Migration[5.2]
+  def change
+    safety_assured do
+      add_column :lists, :reblogs, :boolean, default: false, null: false
+      add_index :lists, :id, name: :lists_reblog_feeds, where: '(reblogs = TRUE)'
+    end
+  end
+end