summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20200603120448_remove_unread_from_chats.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-06-03 14:26:50 +0200
committerlain <lain@soykaf.club>2020-06-03 14:26:50 +0200
commit7f5c5b11a5baeddec36ccc01b4954ac8aa9f8590 (patch)
treec175d81013de59da38cc8008e7122c4e6adf7304 /priv/repo/migrations/20200603120448_remove_unread_from_chats.exs
parent8edead7c1dc33457dc30b301b544d71482ef0f28 (diff)
downloadpleroma-7f5c5b11a5baeddec36ccc01b4954ac8aa9f8590.tar.gz
pleroma-7f5c5b11a5baeddec36ccc01b4954ac8aa9f8590.zip
Chats: Remove `unread` from the db, calculate from unseen messages.
Diffstat (limited to 'priv/repo/migrations/20200603120448_remove_unread_from_chats.exs')
-rw-r--r--priv/repo/migrations/20200603120448_remove_unread_from_chats.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200603120448_remove_unread_from_chats.exs b/priv/repo/migrations/20200603120448_remove_unread_from_chats.exs
new file mode 100644
index 000000000..6322137d5
--- /dev/null
+++ b/priv/repo/migrations/20200603120448_remove_unread_from_chats.exs
@@ -0,0 +1,9 @@
+defmodule Pleroma.Repo.Migrations.RemoveUnreadFromChats do
+ use Ecto.Migration
+
+ def change do
+ alter table(:chats) do
+ remove(:unread, :integer, default: 0)
+ end
+ end
+end