Gelato_Candy
[SOLVED] Phoenix ecto mismatch collation
hi my latest phoenix and elixir, psql (PostgreSQL) 15.3 (Debian 15.3-1.pgdg110+1)
had an issue
it always ** (Mix) The database for MyApp.Repo couldn’t be created: ERROR XX000 (internal_error) template database “template1” has a collation version mismatch
but there’s no “template1” database in my psql, and i dont even create that database before
hint: Rebuild all objects in the template database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
The template database was created using collation version 2.36, but the operating system provides version 2.37.
when i try to run mix ecto.create and also all my previous database project had and warning about the collation version mismatch, because of that,i cant run mix ecto , so i cant add or create or update new database for my project
Marked As Solved
benwilson512
Again this isn’t about ecto. Your postgres is broken and you need to fix it before ecto can connect to it. You need to use psql. Go to your terminal and type psql template1.
See: https://dba.stackexchange.com/questions/324649/collation-version-mismatch
Also Liked
Gelato_Candy
oh my god, its so simple than i thought
ALTER DATABASE template1 REFRESH COLLATION VERSION;
NOTICE: changing version from 2.36 to 2.37
thankyou so much, really appreciate
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










