I am trying to setup a fresh database on a new system but I got this error:
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedObject) collation "NOCASE" for encoding "UTF8" does not exist
LINE 4: email VARCHAR(120) COLLATE "NOCASE" NOT NULL,
^
[SQL:
CREATE TABLE users (
id SERIAL NOT NULL,
email VARCHAR(120) COLLATE "NOCASE" NOT NULL,
password VARCHAR(128) NOT NULL
)
]
I haven't changed anything but this works in 2 different computer and one of them runs Postgresql 10. I run this query using SqlAlchemy upgrade just for info.
I created database using this:
CREATE DATABASE db
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'tr_TR.utf8'
LC_CTYPE = 'tr_TR.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;