mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-06 23:57:41 +08:00
[mai2] add buddies plus support (#177)
Adds favorite music support (there's an option in the results screen to star a song), handlers for new methods and fixes upsert failures for `userFavoriteList`. The `UserIntimateApi` has been added but didn't seem to add any data during testing, and `CreateTokenApi`/`RemoveTokenApi` have also been added but I think they're only used during guest play. --- Tested on 1.45 with no errors/game crashes (see logs). Card Maker hasn't been tested as I don't have a setup to play with. Reviewed-on: https://gitea.tendokyu.moe/Hay1tsme/artemis/pulls/177 Co-authored-by: ppc <albie@ppc.moe> Co-committed-by: ppc <albie@ppc.moe>
This commit is contained in:
28
core/data/alembic/versions/28443e2da5b8_mai2_buddies_plus.py
Normal file
28
core/data/alembic/versions/28443e2da5b8_mai2_buddies_plus.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""mai2_buddies_plus
|
||||
|
||||
Revision ID: 28443e2da5b8
|
||||
Revises: 5ea73f89d982
|
||||
Create Date: 2024-09-15 20:44:02.351819
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '28443e2da5b8'
|
||||
down_revision = '5ea73f89d982'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('mai2_profile_detail', sa.Column('point', sa.Integer()))
|
||||
op.add_column('mai2_profile_detail', sa.Column('totalPoint', sa.Integer()))
|
||||
op.add_column('mai2_profile_detail', sa.Column('friendRegistSkip', sa.SmallInteger()))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('mai2_profile_detail', 'point')
|
||||
op.drop_column('mai2_profile_detail', 'totalPoint')
|
||||
op.drop_column('mai2_profile_detail', 'friendRegistSkip')
|
||||
43
core/data/alembic/versions/54a84103b84e_mai2_intimacy.py
Normal file
43
core/data/alembic/versions/54a84103b84e_mai2_intimacy.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""mai2_intimacy
|
||||
|
||||
Revision ID: 54a84103b84e
|
||||
Revises: bc91c1206dca
|
||||
Create Date: 2024-09-16 17:47:49.164546
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import Column, Integer, UniqueConstraint
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '54a84103b84e'
|
||||
down_revision = 'bc91c1206dca'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
"mai2_user_intimate",
|
||||
Column("id", Integer, primary_key=True, nullable=False),
|
||||
Column("user", Integer, nullable=False),
|
||||
Column("partnerId", Integer, nullable=False),
|
||||
Column("intimateLevel", Integer, nullable=False),
|
||||
Column("intimateCountRewarded", Integer, nullable=False),
|
||||
UniqueConstraint("user", "partnerId", name="mai2_user_intimate_uk"),
|
||||
mysql_charset="utf8mb4",
|
||||
)
|
||||
|
||||
op.create_foreign_key(
|
||||
None,
|
||||
"mai2_user_intimate",
|
||||
"aime_user",
|
||||
["user"],
|
||||
["id"],
|
||||
ondelete="cascade",
|
||||
onupdate="cascade",
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_table("mai2_user_intimate")
|
||||
@@ -0,0 +1,24 @@
|
||||
"""mai2_favorite_song_ordering
|
||||
|
||||
Revision ID: bc91c1206dca
|
||||
Revises: 28443e2da5b8
|
||||
Create Date: 2024-09-16 14:24:56.714066
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'bc91c1206dca'
|
||||
down_revision = '28443e2da5b8'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('mai2_item_favorite_music', sa.Column('orderId', sa.Integer(), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('mai2_item_favorite_music', 'orderId')
|
||||
Reference in New Issue
Block a user