projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rip out fetch_initial_posts
[akkoma]
/
priv
/
repo
/
migrations
/
20171109091239_add_actor_to_activity.exs
diff --git
a/priv/repo/migrations/20171109091239_add_actor_to_activity.exs
b/priv/repo/migrations/20171109091239_add_actor_to_activity.exs
index bac53972cfb6c778e5f9c0b3a6cda523a0222042..91348f5c38f8c6d133a32437582d94dae0a30e25 100644
(file)
--- a/
priv/repo/migrations/20171109091239_add_actor_to_activity.exs
+++ b/
priv/repo/migrations/20171109091239_add_actor_to_activity.exs
@@
-5,20
+5,17
@@
defmodule Pleroma.Repo.Migrations.AddActorToActivity do
def up do
alter table(:activities) do
def up do
alter table(:activities) do
- add
:actor, :string
+ add
(:actor, :string)
end
end
- execute """
- update activities set actor = data->>'actor';
- """
-
- create index(:activities, [:actor, "id DESC NULLS LAST"], concurrently: true)
+ create(index(:activities, [:actor, "id DESC NULLS LAST"], concurrently: true))
end
def down do
end
def down do
- drop index(:activities, [:actor, "id DESC NULLS LAST"])
+ drop_if_exists(index(:activities, [:actor, "id DESC NULLS LAST"]))
+
alter table(:activities) do
alter table(:activities) do
- remove
:actor
+ remove
(:actor)
end
end
end
end
end
end