22 lines
503 B
Elixir
22 lines
503 B
Elixir
defmodule Frenzy.Repo.Migrations.CreateItems do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:items) do
|
|
add :guid, :string
|
|
add :title, :string
|
|
add :url, :string
|
|
add :creator, :string
|
|
add :date, :utc_datetime
|
|
add :content, :text
|
|
add :read, :boolean, default: false, null: false
|
|
add :read_date, :utc_datetime
|
|
add :feed_id, references(:feeds, on_delete: :delete_all)
|
|
|
|
timestamps()
|
|
end
|
|
|
|
# create index(:items, [:feed])
|
|
end
|
|
end
|