memEx/priv/repo/migrations/20220726000552_create_notes.exs

18 lines
416 B
Elixir
Raw Normal View History

2022-07-25 20:08:40 -04:00
defmodule Memex.Repo.Migrations.CreateNotes do
use Ecto.Migration
def change do
create table(:notes, primary_key: false) do
add :id, :binary_id, primary_key: true
add :title, :string
add :content, :text
2022-11-17 22:38:52 -05:00
add :tags, {:array, :string}
2022-07-25 20:08:40 -04:00
add :visibility, :string
2022-11-17 22:38:52 -05:00
add :user_id, references(:users, on_delete: :delete_all, type: :binary_id)
2022-07-25 20:08:40 -04:00
timestamps()
end
end
end