More tests

This commit is contained in:
Thomas Citharel
2018-08-24 11:34:00 +02:00
parent a3852f26c1
commit 686cf04787
29 changed files with 945 additions and 241 deletions

View File

@@ -0,0 +1,19 @@
defmodule Eventos.Repo.Migrations.AddPrimaryKeyToMember do
use Ecto.Migration
def up do
execute("ALTER TABLE members DROP CONSTRAINT IF EXISTS members_pkey")
drop_if_exists index(:members, ["members_account_id_index"])
create unique_index(:members, [:actor_id, :parent_id], name: :members_actor_parent_unique_index)
alter table(:members) do
add :id, :serial, primary_key: true
end
end
def down do
drop index(:members, [:actor_id, :parent_id], name: :members_actor_parent_unique_index)
alter table(:members) do
remove :id
end
end
end