summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20180606173637_create_apid_host_extraction_index.exs
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2018-06-06 21:13:40 +0300
committereal <eal@waifu.club>2018-06-06 21:13:40 +0300
commit29c9c8d93b263e57915158d09761bc6586826798 (patch)
tree64702d97dd8829c4b16d71a70dcf86b3d3e52f52 /priv/repo/migrations/20180606173637_create_apid_host_extraction_index.exs
parent9075b6d25b4b136bb8d8ae888bd52996a9f302e2 (diff)
downloadpleroma-29c9c8d93b263e57915158d09761bc6586826798.tar.gz
pleroma-29c9c8d93b263e57915158d09761bc6586826798.zip
Extract host from ap_id, add index
Diffstat (limited to 'priv/repo/migrations/20180606173637_create_apid_host_extraction_index.exs')
-rw-r--r--priv/repo/migrations/20180606173637_create_apid_host_extraction_index.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/priv/repo/migrations/20180606173637_create_apid_host_extraction_index.exs b/priv/repo/migrations/20180606173637_create_apid_host_extraction_index.exs
new file mode 100644
index 000000000..9831a1b82
--- /dev/null
+++ b/priv/repo/migrations/20180606173637_create_apid_host_extraction_index.exs
@@ -0,0 +1,8 @@
+defmodule Pleroma.Repo.Migrations.CreateApidHostExtractionIndex do
+ use Ecto.Migration
+ @disable_ddl_transaction true
+
+ def change do
+ create index(:activities, ["(split_part(actor, '/', 3))"], concurrently: true, name: :activities_hosts)
+ end
+end