Phoenix : can't insert foreign keys in Postgres

You are missing the user_id part there. :slight_smile:

|> cast(attrs, [:title, :body, :user_id])
|> validate_required([:title, :body, :user_id])