Add part of room creation endpoint

This commit is contained in:
Pim Kunis 2021-07-17 17:38:20 +02:00
parent 585de861d6
commit 9be94751dc
12 changed files with 168 additions and 48 deletions

View file

@ -0,0 +1,10 @@
defmodule MatrixServer.Repo.Migrations.ChangeEventContentToJson do
use Ecto.Migration
def change do
execute(
"alter table events alter column content type jsonb using (content::jsonb);",
"alter table events alter column content type character varying(255);"
)
end
end

View file

@ -0,0 +1,10 @@
defmodule MatrixServer.Repo.Migrations.ChangeEventTimestampToInteger do
use Ecto.Migration
def change do
alter table(:events) do
remove :timestamp, :string, null: false
add :origin_server_ts, :integer, null: false
end
end
end

View file

@ -0,0 +1,7 @@
defmodule MatrixServer.Repo.Migrations.ChangeEventIdName do
use Ecto.Migration
def change do
rename table(:events), :id, to: :event_id
end
end