Implement register endpoint for m.login.dummy login type

Add device table
This commit is contained in:
Pim Kunis 2021-06-25 17:43:12 +02:00
parent 183120b5a1
commit d81a42bf8a
7 changed files with 229 additions and 19 deletions

View file

@ -0,0 +1,18 @@
defmodule MatrixServer.Repo.Migrations.AddDevicesTable do
use Ecto.Migration
def change do
create table(:devices, primary_key: false) do
add :device_id, :string, primary_key: true, null: false
add :access_token, :string
add :display_name, :string
add :localpart,
references(:accounts, column: :localpart, on_delete: :delete_all, type: :string),
primary_key: true,
null: false
end
create index(:devices, [:localpart])
end
end