22 lines
479 B
Elixir
22 lines
479 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)
|
||
|
|
||
|
timestamps()
|
||
|
end
|
||
|
|
||
|
# create index(:items, [:feed])
|
||
|
end
|
||
|
end
|