persist document to database after 2 seconds of no updates, initialize with current state when joining genserver

This commit is contained in:
2023-11-24 20:24:40 -05:00
parent 52a7a64d23
commit 1ec5459a79
5 changed files with 50 additions and 12 deletions

View File

@@ -0,0 +1,10 @@
defmodule Poex.Repo.Migrations.RemoveStateAndAddContentsToDocument do
use Ecto.Migration
def change do
alter table(:pad_documents) do
remove :state
add :contents, {:array, :map}, default: []
end
end
end