chiya/priv/repo/migrations/20230308191004_create_note_images.exs
2023-03-31 16:58:10 +02:00

15 lines
317 B
Elixir

defmodule Chiya.Repo.Migrations.CreateNoteImages do
use Ecto.Migration
def change do
create table(:note_images) do
add :path, :string
add :content, :text
add :note_id, references(:notes, on_delete: :nothing)
timestamps()
end
create index(:note_images, [:note_id])
end
end