Work on actors

* Implement group GraphQL APIs
* Change Actors changeset to properly set urls
* Remove old actors indexes and add some new ones

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-12-03 11:58:57 +01:00
parent 1d547ce66a
commit fd0dba62e0
8 changed files with 261 additions and 47 deletions

View File

@@ -0,0 +1,19 @@
defmodule Mobilizon.Repo.Migrations.ChangeActorsIndexes do
use Ecto.Migration
def up do
drop index("actors", [:preferred_username, :domain], name: :actors_preferred_username_domain_index)
drop index("actors", [:name, :domain], name: :accounts_username_domain_index)
execute "ALTER INDEX accounts_pkey RENAME TO actors_pkey"
create index("actors", [:preferred_username, :domain, :type], unique: true)
create index("actors", [:url], unique: true)
end
def down do
create index("actors", [:preferred_username, :domain], name: :actors_preferred_username_domain_index)
create index("actors", [:name, :domain], name: :accounts_username_domain_index)
execute "ALTER INDEX actors_pkey RENAME TO accounts_pkey"
drop index("actors", [:preferred_username, :domain, :type])
drop index("actors", [:url])
end
end