Trying cockroachdb on 2.1 beta (v2.1.0-beta.20181015):
- Cannot create a database automatically, but can migrate with ecto.migrate (expected)
- Getting list of tags fails
Replaced query with:
def list_tags do
Ecto.Adapters.SQL.query!(Repo, "select count(*) as tag_count, ut.tag
from articles, (select unnest(tag_list) from articles) as ut(tag)
group by ut.tag
order by tag_count desc limit 5;").rows
|> Enum.map(fn v -> Enum.at(v, 1) end)
end