pokken: fix pokemon_data uk

This commit is contained in:
Hay1tsme 2024-06-14 00:06:39 -04:00
parent bf54969bc1
commit 00224585bb
3 changed files with 61 additions and 7 deletions

View File

@ -0,0 +1,54 @@
"""pokken_fix_pokemon_uk
Revision ID: 3657efefc5a4
Revises: 4a02e623e5e6
Create Date: 2024-06-13 23:50:57.611998
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '3657efefc5a4'
down_revision = '4a02e623e5e6'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('pokken_pokemon_data', 'char_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=True)
op.alter_column('pokken_pokemon_data', 'illustration_book_no',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
op.drop_constraint('pokken_pokemon_data_ibfk_1', table_name='pokken_pokemon_data', type_='foreignkey')
op.drop_index('pokken_pokemon_data_uk', table_name='pokken_pokemon_data')
op.create_unique_constraint('pokken_pokemon_uk', 'pokken_pokemon_data', ['user', 'illustration_book_no'])
op.create_foreign_key("pokken_pokemon_data_ibfk_1", "pokken_pokemon_data", "aime_user", ['user'], ['id'])
op.alter_column('pokken_profile', 'trainer_name',
existing_type=mysql.VARCHAR(length=16),
type_=sa.String(length=14),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('pokken_profile', 'trainer_name',
existing_type=sa.String(length=14),
type_=mysql.VARCHAR(length=16),
existing_nullable=True)
op.drop_constraint('pokken_pokemon_data_ibfk_1', table_name='pokken_pokemon_data', type_='foreignkey')
op.drop_constraint('pokken_pokemon_uk', 'pokken_pokemon_data', type_='unique')
op.create_index('pokken_pokemon_data_uk', 'pokken_pokemon_data', ['user', 'char_id'], unique=True)
op.create_foreign_key("pokken_pokemon_data_ibfk_1", "pokken_pokemon_data", "aime_user", ['user'], ['id'])
op.alter_column('pokken_pokemon_data', 'illustration_book_no',
existing_type=mysql.INTEGER(display_width=11),
nullable=True)
op.alter_column('pokken_pokemon_data', 'char_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
# ### end Alembic commands ###

View File

@ -305,12 +305,12 @@ class PokkenBase:
for x in profile_dict.get("event_achievement_param", []): for x in profile_dict.get("event_achievement_param", []):
load_usr.event_achievement_param.append(x) load_usr.event_achievement_param.append(x)
load_usr.support_set_1.append(profile_dict.get("support_set_1_1", 4294967295)) load_usr.support_set_1.append(profile_dict.get("support_set_1_1", 587))
load_usr.support_set_1.append(profile_dict.get("support_set_1_2", 4294967295)) load_usr.support_set_1.append(profile_dict.get("support_set_1_2", 653))
load_usr.support_set_2.append(profile_dict.get("support_set_2_1", 4294967295)) load_usr.support_set_2.append(profile_dict.get("support_set_2_1", 495))
load_usr.support_set_2.append(profile_dict.get("support_set_2_2", 4294967295)) load_usr.support_set_2.append(profile_dict.get("support_set_2_2", 131))
load_usr.support_set_3.append(profile_dict.get("support_set_3_1", 4294967295)) load_usr.support_set_3.append(profile_dict.get("support_set_3_1", 657))
load_usr.support_set_3.append(profile_dict.get("support_set_3_2", 4294967295)) load_usr.support_set_3.append(profile_dict.get("support_set_3_2", 133))
res.load_user.CopyFrom(load_usr) res.load_user.CopyFrom(load_usr)
return res.SerializeToString() return res.SerializeToString()

View File

@ -53,7 +53,7 @@
"type": 0, "type": 0,
"artwork": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/257.png" "artwork": "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/257.png"
}, },
"4029": { "10025": {
"name_en": "Pikachu Libre", "name_en": "Pikachu Libre",
"name_jp": "マスクド・ピカチュウ", "name_jp": "マスクド・ピカチュウ",
"type": 3, "type": 3,