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 :content, :text add :visibility, :string, default: "public" add :sensitive, :boolean, default: false add :language, :string add :in_reply_to, :string add :actor_id, references(:actors, on_delete: :delete_all) timestamps(type: :utc_datetime) end create index(:notes, [:actor_id]) end end