chuni: add missing alembic script
This commit is contained in:
parent
c4afb083f9
commit
44fb6037cf
@ -1,6 +1,10 @@
|
||||
# Changelog
|
||||
Documenting updates to ARTEMiS, to be updated every time the master branch is pushed to.
|
||||
|
||||
## 20240629
|
||||
### CHUNITHM
|
||||
+ Add team points
|
||||
|
||||
## 20240628
|
||||
### maimai
|
||||
+ Add present support
|
||||
|
28
core/data/alembic/versions/745448d83696_chuni_team_points.py
Normal file
28
core/data/alembic/versions/745448d83696_chuni_team_points.py
Normal file
@ -0,0 +1,28 @@
|
||||
"""chuni_team_points
|
||||
|
||||
Revision ID: 745448d83696
|
||||
Revises: 5ea363686347
|
||||
Create Date: 2024-06-29 00:05:22.479187
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '745448d83696'
|
||||
down_revision = '5ea363686347'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('chuni_profile_team', sa.Column('userTeamPoint', sa.JSON(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('chuni_profile_team', 'userTeamPoint')
|
||||
# ### end Alembic commands ###
|
@ -737,7 +737,7 @@ class ChuniBase:
|
||||
team_name = team["teamName"]
|
||||
team_rank = await self.data.profile.get_team_rank(team["id"])
|
||||
team_point = team["teamPoint"]
|
||||
if team["userTeamPoint"] is not None and team["userTeamPoint"] is not "":
|
||||
if team["userTeamPoint"] is not None and team["userTeamPoint"] != "":
|
||||
user_team_point_data = json.loads(team["userTeamPoint"])
|
||||
for user_point_data in user_team_point_data:
|
||||
if user_point_data["user"] == data["userId"]:
|
||||
|
@ -718,7 +718,7 @@ class ChuniProfileData(BaseData):
|
||||
)
|
||||
return False
|
||||
user_team_point_data = []
|
||||
if existing_team["userTeamPoint"] is not None and existing_team["userTeamPoint"] is not "":
|
||||
if existing_team["userTeamPoint"] is not None and existing_team["userTeamPoint"] != "":
|
||||
user_team_point_data = json.loads(existing_team["userTeamPoint"])
|
||||
updated = False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user