architex/priv/repo/migrations/20210729143750_change_room_state_to_array.exs
Pim Kunis 9e02d5b95c Refactor room server
Serialize and save room state in database
Get room state from database when creating a room server
2021-07-29 16:59:40 +02:00

10 lines
273 B
Elixir

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