2023-03-09 07:28:06 +01:00
|
|
|
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
|
2023-03-31 16:58:10 +02:00
|
|
|
end
|