add quilljs, create channel for syncing documents

This commit is contained in:
2023-11-24 19:07:52 -05:00
parent 7de2bad456
commit 52a7a64d23
35 changed files with 1092 additions and 250 deletions

View File

@@ -0,0 +1,13 @@
defmodule Poex.Repo.Migrations.CreatePadDocuments do
use Ecto.Migration
def change do
create table(:pad_documents, primary_key: false) do
add :id, :uuid, primary_key: true, null: false
add :title, :string
add :state, :map, default: "{}"
timestamps(type: :utc_datetime)
end
end
end

View File

@@ -0,0 +1,17 @@
defmodule Poex.Repo.Migrations.CreateOperations do
use Ecto.Migration
def change do
create table(:operations, primary_key: false) do
add :id, :uuid, primary_key: true, null: false
add :type, :string
add :value, :map
add :attributes, :map
add :document_id, references(:pad_documents, type: :uuid)
timestamps()
end
create index(:operations, [:document_id])
end
end