diff options
author | lain <lain@soykaf.club> | 2019-10-07 18:06:48 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-10-07 18:06:48 +0200 |
commit | 51c15787804884391403a19df7667cfaadd9a9fa (patch) | |
tree | 151eeb5128e377e27e432dfb900021ab408a1c92 | |
parent | 93bdc55306895dce0554e7838ecf2ea7ddaea3a7 (diff) | |
download | pleroma-51c15787804884391403a19df7667cfaadd9a9fa.tar.gz |
Object: Add the ap_id column.
-rw-r--r-- | lib/pleroma/object.ex | 1 | ||||
-rw-r--r-- | priv/repo/migrations/20191007123056_add_ap_id_column_to_objects.exs | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index cdfbacb0e..9ff6e588a 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -19,6 +19,7 @@ defmodule Pleroma.Object do schema "objects" do field(:data, :map) + field(:ap_id, :string) timestamps() end diff --git a/priv/repo/migrations/20191007123056_add_ap_id_column_to_objects.exs b/priv/repo/migrations/20191007123056_add_ap_id_column_to_objects.exs new file mode 100644 index 000000000..ebc94833c --- /dev/null +++ b/priv/repo/migrations/20191007123056_add_ap_id_column_to_objects.exs @@ -0,0 +1,11 @@ +defmodule Pleroma.Repo.Migrations.AddApIdColumnToObjects do + use Ecto.Migration + + def change do + alter table(:objects) do + add :ap_id, :string + end + + create unique_index(:objects, [:ap_id], concurrently: true) + end +end |