add quilljs, create channel for syncing documents
This commit is contained in:
13
priv/repo/migrations/20231114025400_create_pad_documents.exs
Normal file
13
priv/repo/migrations/20231114025400_create_pad_documents.exs
Normal 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
|
17
priv/repo/migrations/20231124191833_create_operations.exs
Normal file
17
priv/repo/migrations/20231124191833_create_operations.exs
Normal 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
|
Reference in New Issue
Block a user