From 7242a187ab4c5b27e14ad703a906dd2ae75db7af Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Fri, 28 Jun 2024 12:25:33 -0400 Subject: [PATCH] sao: fix sao_hero_log_data nullability --- .../versions/680789dabab3_sao_player_changes.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/data/alembic/versions/680789dabab3_sao_player_changes.py b/core/data/alembic/versions/680789dabab3_sao_player_changes.py index 9cc60d4..3e4aef7 100644 --- a/core/data/alembic/versions/680789dabab3_sao_player_changes.py +++ b/core/data/alembic/versions/680789dabab3_sao_player_changes.py @@ -64,6 +64,12 @@ def upgrade(): op.add_column('sao_hero_log_data', sa.Column('property4_value1', sa.INTEGER(), server_default='0', nullable=False)) op.add_column('sao_hero_log_data', sa.Column('property4_value2', sa.INTEGER(), server_default='0', nullable=False)) op.add_column('sao_hero_log_data', sa.Column('converted_card_num', sa.INTEGER(), server_default='0', nullable=False)) + op.alter_column('sao_hero_log_data', 'main_weapon', + existing_type=mysql.INTEGER(), + nullable=True) + op.alter_column('sao_hero_log_data', 'sub_equipment', + existing_type=mysql.INTEGER(), + nullable=True) op.alter_column('sao_hero_log_data', 'skill_slot1_skill_id', existing_type=mysql.INTEGER(), type_=sa.BIGINT(), @@ -235,12 +241,10 @@ def downgrade(): type_=mysql.INTEGER(), nullable=False) op.alter_column('sao_hero_log_data', 'sub_equipment', - existing_type=sa.BIGINT(), - type_=mysql.INTEGER(), + existing_type=mysql.INTEGER(), nullable=False) op.alter_column('sao_hero_log_data', 'main_weapon', - existing_type=sa.BIGINT(), - type_=mysql.INTEGER(), + existing_type=mysql.INTEGER(), nullable=False) op.drop_column('sao_hero_log_data', 'converted_card_num') op.drop_column('sao_hero_log_data', 'property4_value2')