mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
fix seeds
This commit is contained in:
parent
7a4d47db2f
commit
ae651fd204
1 changed files with 3 additions and 2 deletions
|
@ -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 =
|
||||||
|
|
Loading…
Reference in a new issue