mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: Switch to postgres
Migrate from MariaDB to PostgreSQL. Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
parent
3220cf886e
commit
db8e2458f9
64 changed files with 572 additions and 629 deletions
|
@ -21,6 +21,13 @@ CLOSED_ID = 1
|
|||
ACCEPTED_ID = 2
|
||||
REJECTED_ID = 3
|
||||
|
||||
STATUS_DISPLAY = {
|
||||
PENDING_ID: PENDING,
|
||||
CLOSED_ID: CLOSED,
|
||||
ACCEPTED_ID: ACCEPTED,
|
||||
REJECTED_ID: REJECTED,
|
||||
}
|
||||
|
||||
|
||||
class PackageRequest(Base):
|
||||
__table__ = schema.PackageRequests
|
||||
|
@ -51,13 +58,6 @@ class PackageRequest(Base):
|
|||
foreign_keys=[__table__.c.ClosedUID],
|
||||
)
|
||||
|
||||
STATUS_DISPLAY = {
|
||||
PENDING_ID: PENDING,
|
||||
CLOSED_ID: CLOSED,
|
||||
ACCEPTED_ID: ACCEPTED,
|
||||
REJECTED_ID: REJECTED,
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
@ -105,7 +105,7 @@ class PackageRequest(Base):
|
|||
|
||||
def status_display(self) -> str:
|
||||
"""Return a display string for the Status column."""
|
||||
return self.STATUS_DISPLAY[self.Status]
|
||||
return STATUS_DISPLAY[self.Status]
|
||||
|
||||
def ml_message_id_hash(self) -> str:
|
||||
"""Return the X-Message-ID-Hash that is used in the mailing list archive."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue