fix seeds

This commit is contained in:
byte[] 2019-12-29 00:12:23 -05:00
parent 7a4d47db2f
commit ae651fd204

View file

@ -11,13 +11,14 @@
# and so on) as they will fail if something goes wrong. # and so on) as they will fail if something goes wrong.
alias Philomena.{Repo, Comments.Comment, Filters.Filter, Forums.Forum, Galleries.Gallery, Posts.Post, Images.Image, Reports.Report, Roles.Role, Tags.Tag, Users.User} alias Philomena.{Repo, Comments.Comment, Filters.Filter, Forums.Forum, Galleries.Gallery, Posts.Post, Images.Image, Reports.Report, Roles.Role, Tags.Tag, Users.User}
alias Philomena.Elasticsearch
alias Philomena.Tags alias Philomena.Tags
import Ecto.Query import Ecto.Query
IO.puts "---- Creating Elasticsearch indices" IO.puts "---- Creating Elasticsearch indices"
for model <- [Image, Comment, Gallery, Tag, Post, Report] do for model <- [Image, Comment, Gallery, Tag, Post, Report] do
model.delete_index! Elasticsearch.delete_index!(model)
model.create_index! Elasticsearch.create_index!(model)
end end
resources = resources =