Implement register endpoint for m.login.dummy login type
Add device table
This commit is contained in:
parent
183120b5a1
commit
d81a42bf8a
7 changed files with 229 additions and 19 deletions
18
priv/repo/migrations/20210623145023_add_devices_table.exs
Normal file
18
priv/repo/migrations/20210623145023_add_devices_table.exs
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue