projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/incorrect-expirations' into 'develop'
[akkoma]
/
priv
/
repo
/
migrations
/
20191118084500_data_migration_populate_user_relationships.exs
diff --git
a/priv/repo/migrations/20191118084500_data_migration_populate_user_relationships.exs
b/priv/repo/migrations/20191118084500_data_migration_populate_user_relationships.exs
index f8dde7626b9fed8744cbd8777246778191a90c33..990e9f3b8f8d48d8b01022a50760c7e28c218bb9 100644
(file)
--- a/
priv/repo/migrations/20191118084500_data_migration_populate_user_relationships.exs
+++ b/
priv/repo/migrations/20191118084500_data_migration_populate_user_relationships.exs
@@
-8,9
+8,13
@@
defmodule Pleroma.Repo.Migrations.DataMigrationPopulateUserRelationships do
def up do
Enum.each(
def up do
Enum.each(
- [blocks: 1, mutes: 2, muted_reblogs: 3, muted_notifications: 4],
+ [blocks: 1, mutes: 2, muted_reblogs: 3, muted_notifications: 4
, subscribers: 5
],
fn {field, relationship_type_code} ->
migrate(field, relationship_type_code)
fn {field, relationship_type_code} ->
migrate(field, relationship_type_code)
+
+ if field == :subscribers do
+ drop_if_exists(index(:users, [:subscribers]))
+ end
end
)
end
end
)
end