18 lines
395 B
Elixir
18 lines
395 B
Elixir
defmodule Wiki.Repo.Migrations.CreatePages do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:pages) do
|
|
add :title, :string
|
|
add :encrypted_content, :binary
|
|
add :encrypted_content_iv, :binary
|
|
add :encrypted_content_tag, :binary
|
|
add :user_id, references(:users, on_delete: :nothing)
|
|
|
|
timestamps()
|
|
end
|
|
|
|
create index(:pages, [:user_id])
|
|
end
|
|
end
|