Refactor room server

Serialize and save room state in database
Get room state from database when creating a room server
This commit is contained in:
Pim Kunis 2021-07-29 16:59:40 +02:00
parent 65368dc2d4
commit 9e02d5b95c
10 changed files with 122 additions and 146 deletions

View file

@ -0,0 +1,10 @@
defmodule MatrixServer.Repo.Migrations.ChangeRoomStateToArray do
use Ecto.Migration
def change do
alter table(:rooms) do
remove :state, :map, default: %{}, null: false
add :state, {:array, {:array, :string}}, default: [], null: false
end
end
end