Updated warning for incorrect database collation/ctype (#6985)
Signed-off-by: Uday Bansal <43824981+udaybansal19@users.noreply.github.com>
This commit is contained in:
parent
8c75b621bf
commit
7728d87fd7
|
@ -0,0 +1 @@
|
||||||
|
Update warning for incorrect database collation/ctype to include link to documentation.
|
|
@ -53,7 +53,7 @@ class PostgresEngine(object):
|
||||||
if rows and rows[0][0] != "UTF8":
|
if rows and rows[0][0] != "UTF8":
|
||||||
raise IncorrectDatabaseSetup(
|
raise IncorrectDatabaseSetup(
|
||||||
"Database has incorrect encoding: '%s' instead of 'UTF8'\n"
|
"Database has incorrect encoding: '%s' instead of 'UTF8'\n"
|
||||||
"See docs/postgres.rst for more information." % (rows[0][0],)
|
"See docs/postgres.md for more information." % (rows[0][0],)
|
||||||
)
|
)
|
||||||
|
|
||||||
txn.execute(
|
txn.execute(
|
||||||
|
@ -62,12 +62,16 @@ class PostgresEngine(object):
|
||||||
collation, ctype = txn.fetchone()
|
collation, ctype = txn.fetchone()
|
||||||
if collation != "C":
|
if collation != "C":
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Database has incorrect collation of %r. Should be 'C'", collation
|
"Database has incorrect collation of %r. Should be 'C'\n"
|
||||||
|
"See docs/postgres.md for more information.",
|
||||||
|
collation,
|
||||||
)
|
)
|
||||||
|
|
||||||
if ctype != "C":
|
if ctype != "C":
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Database has incorrect ctype of %r. Should be 'C'", ctype
|
"Database has incorrect ctype of %r. Should be 'C'\n"
|
||||||
|
"See docs/postgres.md for more information.",
|
||||||
|
ctype,
|
||||||
)
|
)
|
||||||
|
|
||||||
def check_new_database(self, txn):
|
def check_new_database(self, txn):
|
||||||
|
|
Loading…
Reference in New Issue