defmodule Nulla.Repo.Migrations.CreateNotes do use Ecto.Migration def change do create table(:notes, primary_key: false) do add :id, :bigint, primary_key: true add :inReplyTo, :string add :published, :utc_datetime add :url, :string add :to, {:array, :string} add :cc, {:array, :string} add :sensitive, :boolean, default: false add :content, :text add :language, :string add :actor_id, references(:actors, on_delete: :delete_all) timestamps(type: :utc_datetime) end create index(:notes, [:actor_id]) end end