Merge remote-tracking branch 'origin/develop' into sixohsix/pleroma-post_expiration

This commit is contained in:
lain 2019-08-24 15:48:33 +02:00
commit cc6c0b4ba6
276 changed files with 7847 additions and 1792 deletions

View file

@ -6,7 +6,7 @@ defmodule Pleroma.Repo.Migrations.CreateThreadMutes do
add :user_id, references(:users, type: :uuid, on_delete: :delete_all)
add :context, :string
end
create_if_not_exists unique_index(:thread_mutes, [:user_id, :context], name: :unique_index)
end
end

View file

@ -0,0 +1,20 @@
defmodule Pleroma.Repo.Migrations.AddEmailNotificationsToUserInfo do
use Ecto.Migration
def up do
execute("
UPDATE users
SET info = info || '{
\"email_notifications\": {
\"digest\": false
}
}'")
end
def down do
execute("
UPDATE users
SET info = info - 'email_notifications'
")
end
end

View file

@ -0,0 +1,9 @@
defmodule Pleroma.Repo.Migrations.AddSigninAndLastDigestDatesToUser do
use Ecto.Migration
def change do
alter table(:users) do
add(:last_digest_emailed_at, :naive_datetime, default: fragment("now()"))
end
end
end

View file

@ -0,0 +1,13 @@
defmodule Pleroma.Repo.Migrations.CreateConversationParticipationRecipientShips do
use Ecto.Migration
def change do
create_if_not_exists table(:conversation_participation_recipient_ships) do
add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
add(:participation_id, references(:conversation_participations, on_delete: :delete_all))
end
create_if_not_exists index(:conversation_participation_recipient_ships, [:user_id])
create_if_not_exists index(:conversation_participation_recipient_ships, [:participation_id])
end
end

View file

@ -0,0 +1,7 @@
defmodule Pleroma.Repo.Migrations.AddLikesIndexToObjects do
use Ecto.Migration
def change do
create_if_not_exists index(:objects, ["(data->'likes')"], using: :gin, name: :objects_likes)
end
end