From 7ae3bc3a90925aeef27846487f617790d14baba3 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 2 Dec 2019 10:02:48 -0500 Subject: [PATCH] add missing aliases --- lib/philomena/topics.ex | 2 +- lib/philomena_web/controllers/image_controller.ex | 1 + lib/philomena_web/controllers/topic_controller.ex | 1 + mix.exs | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/philomena/topics.ex b/lib/philomena/topics.ex index 290c9efd..16806840 100644 --- a/lib/philomena/topics.ex +++ b/lib/philomena/topics.ex @@ -58,7 +58,7 @@ defmodule Philomena.Topics do {count, nil} = Forum |> where(id: ^topic.forum_id) - |> repo.update_all(inc: [post_count: 1], set: [last_post_id: hd(topic.posts).id]) + |> repo.update_all(inc: [post_count: 1, topic_count: 1], set: [last_post_id: hd(topic.posts).id]) {:ok, count} end) diff --git a/lib/philomena_web/controllers/image_controller.ex b/lib/philomena_web/controllers/image_controller.ex index 5abd44ed..ac558e42 100644 --- a/lib/philomena_web/controllers/image_controller.ex +++ b/lib/philomena_web/controllers/image_controller.ex @@ -2,6 +2,7 @@ defmodule PhilomenaWeb.ImageController do use PhilomenaWeb, :controller alias PhilomenaWeb.ImageLoader + alias PhilomenaWeb.NotificationCountPlug alias Philomena.{Images, Images.Image, Comments.Comment, Textile.Renderer} alias Philomena.Servers.ImageProcessor alias Philomena.Interactions diff --git a/lib/philomena_web/controllers/topic_controller.ex b/lib/philomena_web/controllers/topic_controller.ex index c0ac5bea..ccb7949f 100644 --- a/lib/philomena_web/controllers/topic_controller.ex +++ b/lib/philomena_web/controllers/topic_controller.ex @@ -1,6 +1,7 @@ defmodule PhilomenaWeb.TopicController do use PhilomenaWeb, :controller + alias PhilomenaWeb.NotificationCountPlug alias Philomena.{Forums.Forum, Topics.Topic, Posts.Post, Polls.Poll, PollOptions.PollOption} alias Philomena.{Forums, Topics, Posts} alias Philomena.Textile.Renderer diff --git a/mix.exs b/mix.exs index 08c1ee6f..a22918c4 100644 --- a/mix.exs +++ b/mix.exs @@ -73,6 +73,8 @@ defmodule Philomena.MixProject do [ "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], "ecto.reset": ["ecto.drop", "ecto.setup"], + "ecto.migrate": ["ecto.migrate", "ecto.dump"], + "ecto.rollback": ["ecto.rollback", "ecto.dump"], test: ["ecto.create --quiet", "ecto.migrate", "test"] ] end