wiki/priv/repo/migrations/20200730022812_create_uploa...

17 lines
358 B
Elixir

defmodule Wiki.Repo.Migrations.CreateUploads do
use Ecto.Migration
def change do
create table(:uploads) do
add :relative_path, :string
add :content_type, :string
add :encryption_iv, :binary
add :page_id, references(:pages, on_delete: :delete_all)
timestamps()
end
create index(:uploads, [:page_id])
end
end