mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
The django.db.backends.postgresql_psycopg2 module is deprecated in favor of django.db.backends.postgresql. It’s been an alias since Django 1.9
This commit is contained in:
parent
090157979b
commit
ce0a012e51
5 changed files with 5 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ SERVERNAME = "testing_mygame"
|
|||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql_psycopg2",
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "evennia",
|
||||
"USER": "evennia",
|
||||
"PASSWORD": "password",
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ IN_GAME_ERRORS = True
|
|||
# ENGINE - path to the the database backend. Possible choices are:
|
||||
# 'django.db.backends.sqlite3', (default)
|
||||
# 'django.db.backends.mysql',
|
||||
# 'django.db.backends.postgresql_psycopg2',
|
||||
# 'django.db.backends.postgresql',
|
||||
# 'django.db.backends.oracle' (untested).
|
||||
# NAME - database name, or path to the db file for sqlite3
|
||||
# USER - db admin (unused in sqlite3)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def _drop_table(db_cursor, table_name):
|
|||
db_cursor.execute("SET FOREIGN_KEY_CHECKS=0;")
|
||||
db_cursor.execute("DROP TABLE {table};".format(table=table_name))
|
||||
db_cursor.execute("SET FOREIGN_KEY_CHECKS=1;")
|
||||
elif _ENGINE == "postgresql_psycopg2":
|
||||
elif _ENGINE == "postgresql":
|
||||
db_cursor.execute("ALTER TABLE {table} DISABLE TRIGGER ALL;".format(table=table_name))
|
||||
db_cursor.execute("DROP TABLE {table};".format(table=table_name))
|
||||
db_cursor.execute("ALTER TABLE {table} ENABLE TRIGGER ALL;".format(table=table_name))
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ class PickledObjectField(models.Field):
|
|||
"""
|
||||
if value is not None and not isinstance(value, PickledObject):
|
||||
# We call force_str here explicitly, so that the encoded string
|
||||
# isn't rejected by the postgresql_psycopg2 backend. Alternatively,
|
||||
# isn't rejected by the postgresql backend. Alternatively,
|
||||
# we could have just registered PickledObject with the psycopg
|
||||
# marshaller (telling it to store it like it would a string), but
|
||||
# since both of these methods result in the same value being stored,
|
||||
|
|
|
|||
|
|
@ -1036,7 +1036,7 @@ def uses_database(name="sqlite3"):
|
|||
shortcut to having to use the full backend name.
|
||||
|
||||
Args:
|
||||
name (str): One of 'sqlite3', 'mysql', 'postgresql_psycopg2'
|
||||
name (str): One of 'sqlite3', 'mysql', 'postgresql'
|
||||
or 'oracle'.
|
||||
|
||||
Returns:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue