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

17 lines
358 B
Elixir
Raw Normal View History

2020-08-01 20:43:55 +00:00
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