sao: fix sao_hero_log_data nullability

This commit is contained in:
Hay1tsme 2024-06-28 12:25:33 -04:00
parent f0515a2130
commit 7242a187ab

View File

@ -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_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('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.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', op.alter_column('sao_hero_log_data', 'skill_slot1_skill_id',
existing_type=mysql.INTEGER(), existing_type=mysql.INTEGER(),
type_=sa.BIGINT(), type_=sa.BIGINT(),
@ -235,12 +241,10 @@ def downgrade():
type_=mysql.INTEGER(), type_=mysql.INTEGER(),
nullable=False) nullable=False)
op.alter_column('sao_hero_log_data', 'sub_equipment', op.alter_column('sao_hero_log_data', 'sub_equipment',
existing_type=sa.BIGINT(), existing_type=mysql.INTEGER(),
type_=mysql.INTEGER(),
nullable=False) nullable=False)
op.alter_column('sao_hero_log_data', 'main_weapon', op.alter_column('sao_hero_log_data', 'main_weapon',
existing_type=sa.BIGINT(), existing_type=mysql.INTEGER(),
type_=mysql.INTEGER(),
nullable=False) nullable=False)
op.drop_column('sao_hero_log_data', 'converted_card_num') op.drop_column('sao_hero_log_data', 'converted_card_num')
op.drop_column('sao_hero_log_data', 'property4_value2') op.drop_column('sao_hero_log_data', 'property4_value2')