mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
housekeep: TU rename - code changes
Renaming of symbols. Functions, variables, values, DB values, etc. Basically everything that is not user-facing. This only covers "Trusted User" things: tests, comments, etc. will covered in a following commit.
This commit is contained in:
parent
7466e96449
commit
1702075875
34 changed files with 265 additions and 203 deletions
|
@ -0,0 +1,37 @@
|
|||
"""Rename TU to Package Maintainer
|
||||
|
||||
Revision ID: 6a64dd126029
|
||||
Revises: c5a6a9b661a0
|
||||
Create Date: 2023-09-01 13:48:15.315244
|
||||
|
||||
"""
|
||||
from aurweb import db
|
||||
from aurweb.models import AccountType
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "6a64dd126029"
|
||||
down_revision = "c5a6a9b661a0"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
# AccountTypes
|
||||
# ID 2 -> Trusted User / Package Maintainer
|
||||
# ID 4 -> Trusted User & Developer / Package Maintainer & Developer
|
||||
|
||||
|
||||
def upgrade():
|
||||
with db.begin():
|
||||
tu = db.query(AccountType).filter(AccountType.ID == 2).first()
|
||||
tudev = db.query(AccountType).filter(AccountType.ID == 4).first()
|
||||
|
||||
tu.AccountType = "Package Maintainer"
|
||||
tudev.AccountType = "Package Maintainer & Developer"
|
||||
|
||||
|
||||
def downgrade():
|
||||
with db.begin():
|
||||
pm = db.query(AccountType).filter(AccountType.ID == 2).first()
|
||||
pmdev = db.query(AccountType).filter(AccountType.ID == 4).first()
|
||||
|
||||
pm.AccountType = "Trusted User"
|
||||
pmdev.AccountType = "Trusted User & Developer"
|
Loading…
Add table
Add a link
Reference in a new issue