Add endpoint for room creation
This commit is contained in:
parent
80c8d3a66b
commit
598af7a884
15 changed files with 679 additions and 551 deletions
|
@ -0,0 +1,22 @@
|
|||
defmodule MatrixServer.Repo.Migrations.AddEventsAndRoomsTable do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:rooms, primary_key: false) do
|
||||
add :id, :string, primary_key: true, null: false
|
||||
add :visibility, :string, null: false, default: "public"
|
||||
end
|
||||
|
||||
create table(:events, primary_key: false) do
|
||||
add :id, :string, primary_key: true, null: false
|
||||
add :type, :string, null: false
|
||||
add :timestamp, :naive_datetime, null: false
|
||||
add :state_key, :string
|
||||
add :sender, :string, null: false
|
||||
add :content, :string
|
||||
add :prev_events, {:array, :string}, null: false
|
||||
add :auth_events, {:array, :string}, null: false
|
||||
add :room_id, references(:rooms, type: :string), null: false
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue