Add alias creation endpoint

This commit is contained in:
Pim Kunis 2021-07-30 15:56:24 +02:00
parent f033b88121
commit 1a5b66a3d7
6 changed files with 74 additions and 3 deletions

View file

@ -0,0 +1,12 @@
defmodule MatrixServer.Repo.Migrations.CreateAliasesTable do
use Ecto.Migration
def change do
create table(:aliases, primary_key: false) do
add :alias, :string, primary_key: true, null: false
add :room_id, references(:rooms, type: :string, on_delete: :delete_all), null: false
end
create index(:aliases, [:room_id])
end
end