def up do
alter table(:activities) do
- add :actor, :string
+ add(:actor, :string)
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
- drop index(:activities, [:actor, "id DESC NULLS LAST"])
+ drop_if_exists(index(:activities, [:actor, "id DESC NULLS LAST"]))
+
alter table(:activities) do
- remove :actor
+ remove(:actor)
end
end
end