projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'cleanup-subscription-controller' into 'develop'
[akkoma]
/
priv
/
repo
/
migrations
/
20190109152453_add_visibility_function.exs
diff --git
a/priv/repo/migrations/20190109152453_add_visibility_function.exs
b/priv/repo/migrations/20190109152453_add_visibility_function.exs
index 6c94f1bb372adf9f6c58d559d802b0b9cfccfe68..43d1074aa7327f5febe7dd744c0b2d4dde6cd022 100644
(file)
--- a/
priv/repo/migrations/20190109152453_add_visibility_function.exs
+++ b/
priv/repo/migrations/20190109152453_add_visibility_function.exs
@@
-1,5
+1,6
@@
defmodule Pleroma.Repo.Migrations.AddVisibilityFunction do
use Ecto.Migration
defmodule Pleroma.Repo.Migrations.AddVisibilityFunction do
use Ecto.Migration
+ @disable_ddl_transaction true
def up do
definition = """
def up do
definition = """
@@
-29,18
+30,21
@@
defmodule Pleroma.Repo.Migrations.AddVisibilityFunction do
create(
index(:activities, ["activity_visibility(actor, recipients, data)"],
create(
index(:activities, ["activity_visibility(actor, recipients, data)"],
- name: :activities_visibility_index
+ name: :activities_visibility_index,
+ concurrently: true
)
)
end
def down do
)
)
end
def down do
- drop(
+ drop
_if_exists
(
index(:activities, ["activity_visibility(actor, recipients, data)"],
name: :activities_visibility_index
)
)
index(:activities, ["activity_visibility(actor, recipients, data)"],
name: :activities_visibility_index
)
)
- execute("drop function activity_visibility(actor varchar, recipients varchar[], data jsonb)")
+ execute(
+ "drop function if exists activity_visibility(actor varchar, recipients varchar[], data jsonb)"
+ )
end
end
end
end