feat: Switch to postgres

Migrate from MariaDB to PostgreSQL.

Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
moson 2023-11-30 15:13:42 +01:00
parent eca8bbf515
commit 122df968dc
No known key found for this signature in database
GPG key ID: 4A4760AB4EE15296
64 changed files with 1467 additions and 1441 deletions

View file

@ -50,7 +50,7 @@ class AnonymousUser:
LangPreference = aurweb.config.get("options", "default_lang")
Timezone = aurweb.config.get("options", "default_timezone")
Suspended = 0
Suspended = False
InactivityTS = 0
# A stub ssh_pub_key relationship.
@ -120,7 +120,7 @@ class BasicAuthBackend(AuthenticationBackend):
# At this point, we cannot have an invalid user if the record
# exists, due to ForeignKey constraints in the schema upheld
# by mysqlclient.
# by the database system.
user = db.query(User).filter(User.ID == record.UsersID).first()
user.nonce = util.make_nonce()
user.authenticated = True