1
0
mirror of synced 2024-11-23 22:10:57 +01:00

sao: split massive upgrade in half and hope it works

This commit is contained in:
Kevin Trocolli 2024-06-26 23:31:59 -04:00
parent 5eb2ef8311
commit c13b096190
3 changed files with 430 additions and 504 deletions

View File

@ -0,0 +1,277 @@
"""sao_player_changes
Revision ID: 680789dabab3
Revises: a616fd164e40
Create Date: 2024-06-26 23:19:16.863778
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '680789dabab3'
down_revision = 'a616fd164e40'
branch_labels = None
depends_on = None
def upgrade():
op.add_column('sao_equipment_data', sa.Column('is_shop_purchase', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('is_protect', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property1_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property1_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property1_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property2_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property2_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property2_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property3_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property3_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property3_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property4_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property4_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property4_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('converted_card_num', sa.INTEGER(), server_default='0', nullable=False))
op.alter_column('sao_equipment_data', 'equipment_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
existing_nullable=False)
op.alter_column('sao_equipment_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property2_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property4_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property3_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property1_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_equipment_list', ['equipment_id'], ['EquipmentId'], onupdate='cascade', ondelete='cascade')
op.add_column('sao_hero_log_data', sa.Column('hero_log_id', sa.BIGINT(), nullable=False))
op.add_column('sao_hero_log_data', sa.Column('max_level_extend_num', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('is_awakenable', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('awakening_stage', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('awakening_exp', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('is_shop_purchase', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('is_protect', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property1_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property1_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property1_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property2_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property2_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property2_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property3_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property3_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property3_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property4_property_id', sa.BIGINT(), server_default='2', 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('converted_card_num', sa.INTEGER(), server_default='0', nullable=False))
op.alter_column('sao_hero_log_data', 'main_weapon',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'sub_equipment',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot1_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot2_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot3_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot4_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot5_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.drop_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', type_='unique')
op.create_unique_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', ['user', 'hero_log_id'])
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property4_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot1_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot5_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot2_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot3_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_equipment_data', ['main_weapon'], ['id'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property3_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot4_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_equipment_data', ['sub_equipment'], ['id'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property1_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_hero_list', ['hero_log_id'], ['HeroLogId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property2_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.drop_column('sao_hero_log_data', 'user_hero_log_id')
op.create_foreign_key(None, 'sao_hero_party', 'sao_hero_log_data', ['user_hero_log_id_3'], ['id'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_party', 'sao_hero_log_data', ['user_hero_log_id_1'], ['id'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_party', 'sao_hero_log_data', ['user_hero_log_id_2'], ['id'], onupdate='cascade', ondelete='cascade')
op.alter_column('sao_item_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.alter_column('sao_play_sessions', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.add_column('sao_player_quest', sa.Column('quest_type', sa.INTEGER(), server_default='1', nullable=False))
op.add_column('sao_player_quest', sa.Column('quest_scene_id', sa.BIGINT(), nullable=False))
op.alter_column('sao_player_quest', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.drop_constraint('sao_player_quest_uk', 'sao_player_quest', type_='unique')
op.create_unique_constraint('sao_player_quest_uk', 'sao_player_quest', ['user', 'quest_scene_id'])
op.create_foreign_key(None, 'sao_player_quest', 'sao_static_quest', ['quest_scene_id'], ['QuestSceneId'], onupdate='cascade', ondelete='cascade')
op.drop_column('sao_player_quest', 'episode_id')
op.add_column('sao_profile', sa.Column('my_shop', sa.INTEGER(), nullable=True))
op.add_column('sao_profile', sa.Column('fav_hero', sa.INTEGER(), nullable=True))
op.add_column('sao_profile', sa.Column('when_register', sa.TIMESTAMP(), server_default=sa.text('now()'), nullable=True))
op.add_column('sao_profile', sa.Column('last_login_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_yui_medal_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_bonus_yui_medal_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_comeback_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_login_bonus_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('ad_confirm_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('login_ct', sa.INTEGER(), server_default='0', nullable=True))
op.create_foreign_key(None, 'sao_profile', 'sao_hero_log_data', ['fav_hero'], ['id'], onupdate='cascade', ondelete='set null')
def downgrade():
op.drop_constraint(None, 'sao_profile', type_='foreignkey')
op.drop_column('sao_profile', 'login_ct')
op.drop_column('sao_profile', 'ad_confirm_date')
op.drop_column('sao_profile', 'last_login_bonus_date')
op.drop_column('sao_profile', 'last_comeback_date')
op.drop_column('sao_profile', 'last_bonus_yui_medal_date')
op.drop_column('sao_profile', 'last_yui_medal_date')
op.drop_column('sao_profile', 'last_login_date')
op.drop_column('sao_profile', 'when_register')
op.drop_column('sao_profile', 'fav_hero')
op.drop_column('sao_profile', 'my_shop')
op.add_column('sao_player_quest', sa.Column('episode_id', mysql.INTEGER(), autoincrement=False, nullable=False))
op.drop_constraint(None, 'sao_player_quest', type_='foreignkey')
op.drop_constraint('sao_player_quest_uk', 'sao_player_quest', type_='unique')
op.create_unique_constraint('sao_player_quest_uk', 'sao_player_quest', ['user', 'episode_id'])
op.alter_column('sao_player_quest', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.drop_column('sao_player_quest', 'quest_scene_id')
op.drop_column('sao_player_quest', 'quest_type')
op.alter_column('sao_play_sessions', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.alter_column('sao_item_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.drop_constraint(None, 'sao_hero_party', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_party', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_party', type_='foreignkey')
op.add_column('sao_hero_log_data', sa.Column('user_hero_log_id', mysql.INTEGER(), autoincrement=False, nullable=False))
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', type_='unique')
op.create_unique_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', ['user', 'user_hero_log_id'])
op.alter_column('sao_hero_log_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot5_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot4_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot3_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot2_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot1_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'sub_equipment',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'main_weapon',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
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_value1')
op.drop_column('sao_hero_log_data', 'property4_property_id')
op.drop_column('sao_hero_log_data', 'property3_value2')
op.drop_column('sao_hero_log_data', 'property3_value1')
op.drop_column('sao_hero_log_data', 'property3_property_id')
op.drop_column('sao_hero_log_data', 'property2_value2')
op.drop_column('sao_hero_log_data', 'property2_value1')
op.drop_column('sao_hero_log_data', 'property2_property_id')
op.drop_column('sao_hero_log_data', 'property1_value2')
op.drop_column('sao_hero_log_data', 'property1_value1')
op.drop_column('sao_hero_log_data', 'property1_property_id')
op.drop_column('sao_hero_log_data', 'is_protect')
op.drop_column('sao_hero_log_data', 'is_shop_purchase')
op.drop_column('sao_hero_log_data', 'awakening_exp')
op.drop_column('sao_hero_log_data', 'awakening_stage')
op.drop_column('sao_hero_log_data', 'is_awakenable')
op.drop_column('sao_hero_log_data', 'max_level_extend_num')
op.drop_column('sao_hero_log_data', 'hero_log_id')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.alter_column('sao_equipment_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.alter_column('sao_equipment_data', 'equipment_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
existing_nullable=False)
op.drop_column('sao_equipment_data', 'converted_card_num')
op.drop_column('sao_equipment_data', 'property4_value2')
op.drop_column('sao_equipment_data', 'property4_value1')
op.drop_column('sao_equipment_data', 'property4_property_id')
op.drop_column('sao_equipment_data', 'property3_value2')
op.drop_column('sao_equipment_data', 'property3_value1')
op.drop_column('sao_equipment_data', 'property3_property_id')
op.drop_column('sao_equipment_data', 'property2_value2')
op.drop_column('sao_equipment_data', 'property2_value1')
op.drop_column('sao_equipment_data', 'property2_property_id')
op.drop_column('sao_equipment_data', 'property1_value2')
op.drop_column('sao_equipment_data', 'property1_value1')
op.drop_column('sao_equipment_data', 'property1_property_id')
op.drop_column('sao_equipment_data', 'is_protect')
op.drop_column('sao_equipment_data', 'is_shop_purchase')

View File

@ -38,6 +38,7 @@ def upgrade():
sa.PrimaryKeyConstraint('QuestSceneId'),
mysql_charset='utf8mb4'
)
op.create_table('sao_static_property',
sa.Column('PropertyId', sa.BIGINT(), nullable=False),
sa.Column('PropertyTargetType', sa.INTEGER(), nullable=False),
@ -247,513 +248,161 @@ def upgrade():
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.add_column('sao_equipment_data', sa.Column('is_shop_purchase', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('is_protect', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property1_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property1_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property1_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property2_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property2_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property2_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property3_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property3_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property3_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property4_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property4_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('property4_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_equipment_data', sa.Column('converted_card_num', sa.INTEGER(), server_default='0', nullable=False))
op.alter_column('sao_equipment_data', 'equipment_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
existing_nullable=False)
op.alter_column('sao_equipment_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property2_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property4_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property3_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_property', ['property1_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_equipment_data', 'sao_static_equipment_list', ['equipment_id'], ['EquipmentId'], onupdate='cascade', ondelete='cascade')
op.add_column('sao_hero_log_data', sa.Column('hero_log_id', sa.BIGINT(), nullable=False))
op.add_column('sao_hero_log_data', sa.Column('max_level_extend_num', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('is_awakenable', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('awakening_stage', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('awakening_exp', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('is_shop_purchase', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('is_protect', sa.BOOLEAN(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property1_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property1_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property1_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property2_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property2_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property2_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property3_property_id', sa.BIGINT(), server_default='2', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property3_value1', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property3_value2', sa.INTEGER(), server_default='0', nullable=False))
op.add_column('sao_hero_log_data', sa.Column('property4_property_id', sa.BIGINT(), server_default='2', 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('converted_card_num', sa.INTEGER(), server_default='0', nullable=False))
op.alter_column('sao_hero_log_data', 'main_weapon',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'sub_equipment',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot1_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot2_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot3_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot4_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'skill_slot5_skill_id',
existing_type=mysql.INTEGER(),
type_=sa.BIGINT(),
nullable=True)
op.alter_column('sao_hero_log_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.drop_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', type_='unique')
op.create_unique_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', ['user', 'hero_log_id'])
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property4_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot1_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot5_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot2_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot3_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_equipment_data', ['main_weapon'], ['id'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property3_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_skill', ['skill_slot4_skill_id'], ['SkillId'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_equipment_data', ['sub_equipment'], ['id'], onupdate='set null', ondelete='set null')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property1_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_hero_list', ['hero_log_id'], ['HeroLogId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_log_data', 'sao_static_property', ['property2_property_id'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.drop_column('sao_hero_log_data', 'user_hero_log_id')
op.create_foreign_key(None, 'sao_hero_party', 'sao_hero_log_data', ['user_hero_log_id_3'], ['id'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_party', 'sao_hero_log_data', ['user_hero_log_id_1'], ['id'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_hero_party', 'sao_hero_log_data', ['user_hero_log_id_2'], ['id'], onupdate='cascade', ondelete='cascade')
op.alter_column('sao_item_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.alter_column('sao_play_sessions', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.add_column('sao_player_quest', sa.Column('quest_type', sa.INTEGER(), server_default='1', nullable=False))
op.add_column('sao_player_quest', sa.Column('quest_scene_id', sa.BIGINT(), nullable=False))
op.alter_column('sao_player_quest', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('now()'),
existing_nullable=False)
op.drop_constraint('sao_player_quest_uk', 'sao_player_quest', type_='unique')
op.create_unique_constraint('sao_player_quest_uk', 'sao_player_quest', ['user', 'quest_scene_id'])
op.create_foreign_key(None, 'sao_player_quest', 'sao_static_quest', ['quest_scene_id'], ['QuestSceneId'], onupdate='cascade', ondelete='cascade')
op.drop_column('sao_player_quest', 'episode_id')
op.add_column('sao_profile', sa.Column('my_shop', sa.INTEGER(), nullable=True))
op.add_column('sao_profile', sa.Column('fav_hero', sa.INTEGER(), nullable=True))
op.add_column('sao_profile', sa.Column('when_register', sa.TIMESTAMP(), server_default=sa.text('now()'), nullable=True))
op.add_column('sao_profile', sa.Column('last_login_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_yui_medal_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_bonus_yui_medal_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_comeback_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('last_login_bonus_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('ad_confirm_date', sa.TIMESTAMP(), nullable=True))
op.add_column('sao_profile', sa.Column('login_ct', sa.INTEGER(), server_default='0', nullable=True))
op.create_foreign_key(None, 'sao_profile', 'sao_hero_log_data', ['fav_hero'], ['id'], onupdate='cascade', ondelete='set null')
op.add_column('sao_static_equipment_list', sa.Column('EquipmentId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('EquipmentType', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('WeaponTypeId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Name', sa.VARCHAR(length=255), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Name_en', sa.VARCHAR(length=255), nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('Rarity', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Power', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('StrengthIncrement', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('SkillCondition', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property1PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property1Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property1Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property2PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property2Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property2Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property3PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property3Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property3Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property4PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property4Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('Property4Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('SalePrice', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('CompositionExp', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('AwakeningExp', sa.INTEGER(), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('FlavorText', sa.VARCHAR(length=255), nullable=False))
op.add_column('sao_static_equipment_list', sa.Column('FlavorText_en', sa.VARCHAR(length=255), nullable=True))
op.drop_index('sao_static_equipment_list_uk', table_name='sao_static_equipment_list')
op.create_foreign_key(None, 'sao_static_equipment_list', 'sao_static_property', ['Property2PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_equipment_list', 'sao_static_property', ['Property1PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_equipment_list', 'sao_static_property', ['Property3PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_equipment_list', 'sao_static_property', ['Property4PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.drop_column('sao_static_equipment_list', 'id')
op.drop_column('sao_static_equipment_list', 'enabled')
op.drop_column('sao_static_equipment_list', 'version')
op.drop_column('sao_static_equipment_list', 'flavorText')
op.drop_column('sao_static_equipment_list', 'equipmentType')
op.drop_column('sao_static_equipment_list', 'equipmentId')
op.drop_column('sao_static_equipment_list', 'rarity')
op.drop_column('sao_static_equipment_list', 'name')
op.drop_column('sao_static_equipment_list', 'weaponTypeId')
op.add_column('sao_static_hero_list', sa.Column('HeroLogId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('CharaId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Name', sa.VARCHAR(length=255), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Nickname', sa.VARCHAR(length=255), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Name_en', sa.VARCHAR(length=255), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('Nickname_en', sa.VARCHAR(length=255), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('Rarity', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('WeaponTypeId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('HeroLogRoleId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('CostumeTypeId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('UnitId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('DefaultEquipmentId1', sa.BIGINT(), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('DefaultEquipmentId2', sa.BIGINT(), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('SkillTableSubId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('HpMin', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('HpMax', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('StrMin', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('StrMax', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('VitMin', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('VitMax', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('IntMin', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('IntMax', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property1PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property1Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property1Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property2PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property2Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property2Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property3PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property3Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property3Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property4PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property4Value1', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Property4Value2', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('FlavorText', sa.VARCHAR(length=255), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('FlavorText_en', sa.VARCHAR(length=255), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('SalePrice', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('CompositionExp', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('AwakeningExp', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Slot4UnlockLevel', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('Slot5UnlockLevel', sa.INTEGER(), nullable=False))
op.add_column('sao_static_hero_list', sa.Column('CollectionEmptyFrameDisplayFlag', sa.BOOLEAN(), nullable=False))
op.drop_index('sao_static_hero_list_uk', table_name='sao_static_hero_list')
op.create_foreign_key(None, 'sao_static_hero_list', 'sao_static_equipment_list', ['DefaultEquipmentId1'], ['EquipmentId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_hero_list', 'sao_static_property', ['Property3PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_hero_list', 'sao_static_equipment_list', ['DefaultEquipmentId2'], ['EquipmentId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_hero_list', 'sao_static_property', ['Property1PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_hero_list', 'sao_static_property', ['Property2PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.create_foreign_key(None, 'sao_static_hero_list', 'sao_static_property', ['Property4PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.drop_column('sao_static_hero_list', 'awakeningExp')
op.drop_column('sao_static_hero_list', 'id')
op.drop_column('sao_static_hero_list', 'nickname')
op.drop_column('sao_static_hero_list', 'enabled')
op.drop_column('sao_static_hero_list', 'version')
op.drop_column('sao_static_hero_list', 'flavorText')
op.drop_column('sao_static_hero_list', 'heroLogId')
op.drop_column('sao_static_hero_list', 'skillTableSubId')
op.drop_column('sao_static_hero_list', 'rarity')
op.drop_column('sao_static_hero_list', 'name')
op.add_column('sao_static_item_list', sa.Column('ItemId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('ItemTypeId', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('Name', sa.VARCHAR(length=255), nullable=False))
op.add_column('sao_static_item_list', sa.Column('Name_en', sa.VARCHAR(length=255), nullable=True))
op.add_column('sao_static_item_list', sa.Column('Rarity', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('Value', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('PropertyId', sa.BIGINT(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('PropertyValue1Min', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('PropertyValue1Max', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('PropertyValue2Min', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('PropertyValue2Max', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('FlavorText', sa.VARCHAR(length=255), nullable=False))
op.add_column('sao_static_item_list', sa.Column('FlavorText_en', sa.VARCHAR(length=255), nullable=True))
op.add_column('sao_static_item_list', sa.Column('SalePrice', sa.INTEGER(), nullable=False))
op.add_column('sao_static_item_list', sa.Column('ItemIcon', sa.VARCHAR(length=255), nullable=False))
op.drop_index('sao_static_item_list_uk', table_name='sao_static_item_list')
op.create_foreign_key(None, 'sao_static_item_list', 'sao_static_property', ['PropertyId'], ['PropertyId'], onupdate='cascade', ondelete='cascade')
op.drop_column('sao_static_item_list', 'id')
op.drop_column('sao_static_item_list', 'enabled')
op.drop_column('sao_static_item_list', 'version')
op.drop_column('sao_static_item_list', 'flavorText')
op.drop_column('sao_static_item_list', 'rarity')
op.drop_column('sao_static_item_list', 'name')
op.drop_column('sao_static_item_list', 'itemTypeId')
op.drop_column('sao_static_item_list', 'itemId')
op.drop_table('sao_static_equipment_list')
op.create_table("sao_static_equipment_list",
sa.Column("EquipmentId", sa.BIGINT, primary_key=True, nullable=False),
sa.Column("EquipmentType", sa.INTEGER, nullable=False),
sa.Column("WeaponTypeId", sa.INTEGER, nullable=False),
sa.Column("Name", sa.VARCHAR(255), nullable=False),
sa.Column("Name_en", sa.VARCHAR(255)),
sa.Column("Rarity", sa.INTEGER, nullable=False),
sa.Column("Power", sa.INTEGER, nullable=False),
sa.Column("StrengthIncrement", sa.INTEGER, nullable=False),
sa.Column("SkillCondition", sa.INTEGER, nullable=False),
sa.Column("Property1PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property1Value1", sa.INTEGER, nullable=False),
sa.Column("Property1Value2", sa.INTEGER, nullable=False),
sa.Column("Property2PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property2Value1", sa.INTEGER, nullable=False),
sa.Column("Property2Value2", sa.INTEGER, nullable=False),
sa.Column("Property3PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property3Value1", sa.INTEGER, nullable=False),
sa.Column("Property3Value2", sa.INTEGER, nullable=False),
sa.Column("Property4PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property4Value1", sa.INTEGER, nullable=False),
sa.Column("Property4Value2", sa.INTEGER, nullable=False),
sa.Column("SalePrice", sa.INTEGER, nullable=False),
sa.Column("CompositionExp", sa.INTEGER, nullable=False),
sa.Column("AwakeningExp", sa.INTEGER, nullable=False),
sa.Column("FlavorText", sa.VARCHAR(255), nullable=False),
sa.Column("FlavorText_en", sa.VARCHAR(255)),
mysql_charset="utf8mb4"
)
op.drop_table('sao_static_hero_list')
op.create_table("sao_static_hero_list",
sa.Column("HeroLogId", sa.BIGINT, primary_key=True, nullable=False),
sa.Column("CharaId", sa.INTEGER, nullable=False),
sa.Column("Name", sa.VARCHAR(255), nullable=False),
sa.Column("Nickname", sa.VARCHAR(255), nullable=False),
sa.Column("Name_en", sa.VARCHAR(255)),
sa.Column("Nickname_en", sa.VARCHAR(255)),
sa.Column("Rarity", sa.INTEGER, nullable=False),
sa.Column("WeaponTypeId", sa.INTEGER, nullable=False),
sa.Column("HeroLogRoleId", sa.INTEGER, nullable=False),
sa.Column("CostumeTypeId", sa.INTEGER, nullable=False),
sa.Column("UnitId", sa.INTEGER, nullable=False),
sa.Column("DefaultEquipmentId1", sa.BIGINT, sa.ForeignKey("sao_static_equipment_list.EquipmentId", ondelete="cascade", onupdate="cascade")),
sa.Column("DefaultEquipmentId2", sa.BIGINT, sa.ForeignKey("sao_static_equipment_list.EquipmentId", ondelete="cascade", onupdate="cascade")),
sa.Column("SkillTableSubId", sa.INTEGER, nullable=False),
sa.Column("HpMin", sa.INTEGER, nullable=False),
sa.Column("HpMax", sa.INTEGER, nullable=False),
sa.Column("StrMin", sa.INTEGER, nullable=False),
sa.Column("StrMax", sa.INTEGER, nullable=False),
sa.Column("VitMin", sa.INTEGER, nullable=False),
sa.Column("VitMax", sa.INTEGER, nullable=False),
sa.Column("IntMin", sa.INTEGER, nullable=False),
sa.Column("IntMax", sa.INTEGER, nullable=False),
sa.Column("Property1PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property1Value1", sa.INTEGER, nullable=False),
sa.Column("Property1Value2", sa.INTEGER, nullable=False),
sa.Column("Property2PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property2Value1", sa.INTEGER, nullable=False),
sa.Column("Property2Value2", sa.INTEGER, nullable=False),
sa.Column("Property3PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property3Value1", sa.INTEGER, nullable=False),
sa.Column("Property3Value2", sa.INTEGER, nullable=False),
sa.Column("Property4PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("Property4Value1", sa.INTEGER, nullable=False),
sa.Column("Property4Value2", sa.INTEGER, nullable=False),
sa.Column("FlavorText", sa.VARCHAR(255), nullable=False),
sa.Column("FlavorText_en", sa.VARCHAR(255)),
sa.Column("SalePrice", sa.INTEGER, nullable=False),
sa.Column("CompositionExp", sa.INTEGER, nullable=False),
sa.Column("AwakeningExp", sa.INTEGER, nullable=False),
sa.Column("Slot4UnlockLevel", sa.INTEGER, nullable=False),
sa.Column("Slot5UnlockLevel", sa.INTEGER, nullable=False),
sa.Column("CollectionEmptyFrameDisplayFlag", sa.BOOLEAN, nullable=False),
mysql_charset="utf8mb4"
)
op.drop_table('sao_static_item_list')
op.create_table("sao_static_item_list",
sa.Column("ItemId", sa.INTEGER, nullable=False, primary_key=True),
sa.Column("ItemTypeId", sa.INTEGER, nullable=False),
sa.Column("Name", sa.VARCHAR(255), nullable=False),
sa.Column("Name_en", sa.VARCHAR(255)),
sa.Column("Rarity", sa.INTEGER, nullable=False),
sa.Column("Value", sa.INTEGER, nullable=False),
sa.Column("PropertyId", sa.BIGINT, sa.ForeignKey("sao_static_property.PropertyId", ondelete="cascade", onupdate="cascade"), nullable=False),
sa.Column("PropertyValue1Min", sa.INTEGER, nullable=False),
sa.Column("PropertyValue1Max", sa.INTEGER, nullable=False),
sa.Column("PropertyValue2Min", sa.INTEGER, nullable=False),
sa.Column("PropertyValue2Max", sa.INTEGER, nullable=False),
sa.Column("FlavorText", sa.VARCHAR(255), nullable=False),
sa.Column("FlavorText_en", sa.VARCHAR(255)),
sa.Column("SalePrice", sa.INTEGER, nullable=False),
sa.Column("ItemIcon", sa.VARCHAR(255), nullable=False),
mysql_charset="utf8mb4"
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('sao_static_item_list', sa.Column('itemId', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_item_list', sa.Column('itemTypeId', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_item_list', sa.Column('name', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_item_list', sa.Column('rarity', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_item_list', sa.Column('flavorText', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_item_list', sa.Column('version', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_item_list', sa.Column('enabled', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True))
op.add_column('sao_static_item_list', sa.Column('id', mysql.INTEGER(), autoincrement=True, nullable=False))
op.drop_constraint(None, 'sao_static_item_list', type_='foreignkey')
op.create_index('sao_static_item_list_uk', 'sao_static_item_list', ['version', 'itemId'], unique=False)
op.drop_column('sao_static_item_list', 'ItemIcon')
op.drop_column('sao_static_item_list', 'SalePrice')
op.drop_column('sao_static_item_list', 'FlavorText_en')
op.drop_column('sao_static_item_list', 'FlavorText')
op.drop_column('sao_static_item_list', 'PropertyValue2Max')
op.drop_column('sao_static_item_list', 'PropertyValue2Min')
op.drop_column('sao_static_item_list', 'PropertyValue1Max')
op.drop_column('sao_static_item_list', 'PropertyValue1Min')
op.drop_column('sao_static_item_list', 'PropertyId')
op.drop_column('sao_static_item_list', 'Value')
op.drop_column('sao_static_item_list', 'Rarity')
op.drop_column('sao_static_item_list', 'Name_en')
op.drop_column('sao_static_item_list', 'Name')
op.drop_column('sao_static_item_list', 'ItemTypeId')
op.drop_column('sao_static_item_list', 'ItemId')
op.add_column('sao_static_hero_list', sa.Column('name', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('rarity', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_hero_list', sa.Column('skillTableSubId', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_hero_list', sa.Column('heroLogId', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_hero_list', sa.Column('flavorText', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('version', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_hero_list', sa.Column('enabled', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True))
op.add_column('sao_static_hero_list', sa.Column('nickname', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_hero_list', sa.Column('id', mysql.INTEGER(), autoincrement=True, nullable=False))
op.add_column('sao_static_hero_list', sa.Column('awakeningExp', mysql.INTEGER(), autoincrement=False, nullable=True))
op.drop_constraint(None, 'sao_static_hero_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_hero_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_hero_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_hero_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_hero_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_hero_list', type_='foreignkey')
op.create_index('sao_static_hero_list_uk', 'sao_static_hero_list', ['version', 'heroLogId'], unique=False)
op.drop_column('sao_static_hero_list', 'CollectionEmptyFrameDisplayFlag')
op.drop_column('sao_static_hero_list', 'Slot5UnlockLevel')
op.drop_column('sao_static_hero_list', 'Slot4UnlockLevel')
op.drop_column('sao_static_hero_list', 'AwakeningExp')
op.drop_column('sao_static_hero_list', 'CompositionExp')
op.drop_column('sao_static_hero_list', 'SalePrice')
op.drop_column('sao_static_hero_list', 'FlavorText_en')
op.drop_column('sao_static_hero_list', 'FlavorText')
op.drop_column('sao_static_hero_list', 'Property4Value2')
op.drop_column('sao_static_hero_list', 'Property4Value1')
op.drop_column('sao_static_hero_list', 'Property4PropertyId')
op.drop_column('sao_static_hero_list', 'Property3Value2')
op.drop_column('sao_static_hero_list', 'Property3Value1')
op.drop_column('sao_static_hero_list', 'Property3PropertyId')
op.drop_column('sao_static_hero_list', 'Property2Value2')
op.drop_column('sao_static_hero_list', 'Property2Value1')
op.drop_column('sao_static_hero_list', 'Property2PropertyId')
op.drop_column('sao_static_hero_list', 'Property1Value2')
op.drop_column('sao_static_hero_list', 'Property1Value1')
op.drop_column('sao_static_hero_list', 'Property1PropertyId')
op.drop_column('sao_static_hero_list', 'IntMax')
op.drop_column('sao_static_hero_list', 'IntMin')
op.drop_column('sao_static_hero_list', 'VitMax')
op.drop_column('sao_static_hero_list', 'VitMin')
op.drop_column('sao_static_hero_list', 'StrMax')
op.drop_column('sao_static_hero_list', 'StrMin')
op.drop_column('sao_static_hero_list', 'HpMax')
op.drop_column('sao_static_hero_list', 'HpMin')
op.drop_column('sao_static_hero_list', 'SkillTableSubId')
op.drop_column('sao_static_hero_list', 'DefaultEquipmentId2')
op.drop_column('sao_static_hero_list', 'DefaultEquipmentId1')
op.drop_column('sao_static_hero_list', 'UnitId')
op.drop_column('sao_static_hero_list', 'CostumeTypeId')
op.drop_column('sao_static_hero_list', 'HeroLogRoleId')
op.drop_column('sao_static_hero_list', 'WeaponTypeId')
op.drop_column('sao_static_hero_list', 'Rarity')
op.drop_column('sao_static_hero_list', 'Nickname_en')
op.drop_column('sao_static_hero_list', 'Name_en')
op.drop_column('sao_static_hero_list', 'Nickname')
op.drop_column('sao_static_hero_list', 'Name')
op.drop_column('sao_static_hero_list', 'CharaId')
op.drop_column('sao_static_hero_list', 'HeroLogId')
op.add_column('sao_static_equipment_list', sa.Column('weaponTypeId', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('name', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('rarity', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('equipmentId', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('equipmentType', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('flavorText', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('version', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('enabled', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True))
op.add_column('sao_static_equipment_list', sa.Column('id', mysql.INTEGER(), autoincrement=True, nullable=False))
op.drop_constraint(None, 'sao_static_equipment_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_equipment_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_equipment_list', type_='foreignkey')
op.drop_constraint(None, 'sao_static_equipment_list', type_='foreignkey')
op.create_index('sao_static_equipment_list_uk', 'sao_static_equipment_list', ['version', 'equipmentId'], unique=False)
op.drop_column('sao_static_equipment_list', 'FlavorText_en')
op.drop_column('sao_static_equipment_list', 'FlavorText')
op.drop_column('sao_static_equipment_list', 'AwakeningExp')
op.drop_column('sao_static_equipment_list', 'CompositionExp')
op.drop_column('sao_static_equipment_list', 'SalePrice')
op.drop_column('sao_static_equipment_list', 'Property4Value2')
op.drop_column('sao_static_equipment_list', 'Property4Value1')
op.drop_column('sao_static_equipment_list', 'Property4PropertyId')
op.drop_column('sao_static_equipment_list', 'Property3Value2')
op.drop_column('sao_static_equipment_list', 'Property3Value1')
op.drop_column('sao_static_equipment_list', 'Property3PropertyId')
op.drop_column('sao_static_equipment_list', 'Property2Value2')
op.drop_column('sao_static_equipment_list', 'Property2Value1')
op.drop_column('sao_static_equipment_list', 'Property2PropertyId')
op.drop_column('sao_static_equipment_list', 'Property1Value2')
op.drop_column('sao_static_equipment_list', 'Property1Value1')
op.drop_column('sao_static_equipment_list', 'Property1PropertyId')
op.drop_column('sao_static_equipment_list', 'SkillCondition')
op.drop_column('sao_static_equipment_list', 'StrengthIncrement')
op.drop_column('sao_static_equipment_list', 'Power')
op.drop_column('sao_static_equipment_list', 'Rarity')
op.drop_column('sao_static_equipment_list', 'Name_en')
op.drop_column('sao_static_equipment_list', 'Name')
op.drop_column('sao_static_equipment_list', 'WeaponTypeId')
op.drop_column('sao_static_equipment_list', 'EquipmentType')
op.drop_column('sao_static_equipment_list', 'EquipmentId')
op.drop_constraint(None, 'sao_profile', type_='foreignkey')
op.drop_column('sao_profile', 'login_ct')
op.drop_column('sao_profile', 'ad_confirm_date')
op.drop_column('sao_profile', 'last_login_bonus_date')
op.drop_column('sao_profile', 'last_comeback_date')
op.drop_column('sao_profile', 'last_bonus_yui_medal_date')
op.drop_column('sao_profile', 'last_yui_medal_date')
op.drop_column('sao_profile', 'last_login_date')
op.drop_column('sao_profile', 'when_register')
op.drop_column('sao_profile', 'fav_hero')
op.drop_column('sao_profile', 'my_shop')
op.add_column('sao_player_quest', sa.Column('episode_id', mysql.INTEGER(), autoincrement=False, nullable=False))
op.drop_constraint(None, 'sao_player_quest', type_='foreignkey')
op.drop_constraint('sao_player_quest_uk', 'sao_player_quest', type_='unique')
op.create_unique_constraint('sao_player_quest_uk', 'sao_player_quest', ['user', 'episode_id'])
op.alter_column('sao_player_quest', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.drop_column('sao_player_quest', 'quest_scene_id')
op.drop_column('sao_player_quest', 'quest_type')
op.alter_column('sao_play_sessions', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.alter_column('sao_item_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.drop_constraint(None, 'sao_hero_party', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_party', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_party', type_='foreignkey')
op.add_column('sao_hero_log_data', sa.Column('user_hero_log_id', mysql.INTEGER(), autoincrement=False, nullable=False))
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint(None, 'sao_hero_log_data', type_='foreignkey')
op.drop_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', type_='unique')
op.create_unique_constraint('sao_hero_log_data_uk', 'sao_hero_log_data', ['user', 'user_hero_log_id'])
op.alter_column('sao_hero_log_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot5_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot4_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot3_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot2_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'skill_slot1_skill_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'sub_equipment',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
op.alter_column('sao_hero_log_data', 'main_weapon',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
nullable=False)
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_value1')
op.drop_column('sao_hero_log_data', 'property4_property_id')
op.drop_column('sao_hero_log_data', 'property3_value2')
op.drop_column('sao_hero_log_data', 'property3_value1')
op.drop_column('sao_hero_log_data', 'property3_property_id')
op.drop_column('sao_hero_log_data', 'property2_value2')
op.drop_column('sao_hero_log_data', 'property2_value1')
op.drop_column('sao_hero_log_data', 'property2_property_id')
op.drop_column('sao_hero_log_data', 'property1_value2')
op.drop_column('sao_hero_log_data', 'property1_value1')
op.drop_column('sao_hero_log_data', 'property1_property_id')
op.drop_column('sao_hero_log_data', 'is_protect')
op.drop_column('sao_hero_log_data', 'is_shop_purchase')
op.drop_column('sao_hero_log_data', 'awakening_exp')
op.drop_column('sao_hero_log_data', 'awakening_stage')
op.drop_column('sao_hero_log_data', 'is_awakenable')
op.drop_column('sao_hero_log_data', 'max_level_extend_num')
op.drop_column('sao_hero_log_data', 'hero_log_id')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.drop_constraint(None, 'sao_equipment_data', type_='foreignkey')
op.alter_column('sao_equipment_data', 'get_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),
existing_nullable=False)
op.alter_column('sao_equipment_data', 'equipment_id',
existing_type=sa.BIGINT(),
type_=mysql.INTEGER(),
existing_nullable=False)
op.drop_column('sao_equipment_data', 'converted_card_num')
op.drop_column('sao_equipment_data', 'property4_value2')
op.drop_column('sao_equipment_data', 'property4_value1')
op.drop_column('sao_equipment_data', 'property4_property_id')
op.drop_column('sao_equipment_data', 'property3_value2')
op.drop_column('sao_equipment_data', 'property3_value1')
op.drop_column('sao_equipment_data', 'property3_property_id')
op.drop_column('sao_equipment_data', 'property2_value2')
op.drop_column('sao_equipment_data', 'property2_value1')
op.drop_column('sao_equipment_data', 'property2_property_id')
op.drop_column('sao_equipment_data', 'property1_value2')
op.drop_column('sao_equipment_data', 'property1_value1')
op.drop_column('sao_equipment_data', 'property1_property_id')
op.drop_column('sao_equipment_data', 'is_protect')
op.drop_column('sao_equipment_data', 'is_shop_purchase')
op.drop_table('sao_static_item_list')
op.create_table("sao_static_item_list",
sa.Column("id", sa.Integer, primary_key=True, nullable=False),
sa.Column("version", sa.Integer),
sa.Column("itemId", sa.Integer),
sa.Column("itemTypeId", sa.Integer),
sa.Column("name", sa.String(255)),
sa.Column("rarity", sa.Integer),
sa.Column("flavorText", sa.String(255)),
sa.Column("enabled", sa.Boolean),
sa.UniqueConstraint(
"version", "itemId", name="sao_static_item_list_uk"
),
mysql_charset="utf8mb4"
)
op.drop_table('sao_static_hero_list')
op.create_table("sao_static_hero_list",
sa.Column("id", sa.Integer, primary_key=True, nullable=False),
sa.Column("version", sa.Integer),
sa.Column("heroLogId", sa.Integer),
sa.Column("name", sa.String(255)),
sa.Column("nickname", sa.String(255)),
sa.Column("rarity", sa.Integer),
sa.Column("skillTableSubId", sa.Integer),
sa.Column("awakeningExp", sa.Integer),
sa.Column("flavorText", sa.String(255)),
sa.Column("enabled", sa.Boolean),
sa.UniqueConstraint(
"version", "heroLogId", name="sao_static_hero_list_uk"
),
mysql_charset="utf8mb4",
)
op.drop_table('sao_static_equipment_list')
op.create_table("sao_static_equipment_list",
sa.Column("id", sa.Integer, primary_key=True, nullable=False),
sa.Column("version", sa.Integer),
sa.Column("equipmentId", sa.Integer),
sa.Column("equipmentType", sa.Integer),
sa.Column("weaponTypeId", sa.Integer),
sa.Column("name", sa.String(255)),
sa.Column("rarity", sa.Integer),
sa.Column("flavorText", sa.String(255)),
sa.Column("enabled", sa.Boolean),
sa.UniqueConstraint(
"version", "equipmentId", name="sao_static_equipment_list_uk"
),
mysql_charset="utf8mb4"
)
op.alter_column('sao_end_sessions', 'play_date',
existing_type=mysql.TIMESTAMP(),
server_default=sa.text('CURRENT_TIMESTAMP'),

View File

@ -70,8 +70,8 @@ hero_log_data = Table(
Column("hero_log_id", BIGINT, ForeignKey("sao_static_hero_list.HeroLogId", ondelete="cascade", onupdate="cascade"), nullable=False),
Column("log_level", Integer, nullable=False),
Column("log_exp", Integer, nullable=False),
Column("main_weapon", BIGINT, ForeignKey("sao_equipment_data.id", ondelete="set null", onupdate="set null")),
Column("sub_equipment", BIGINT, ForeignKey("sao_equipment_data.id", ondelete="set null", onupdate="set null")),
Column("main_weapon", INTEGER, ForeignKey("sao_equipment_data.id", ondelete="set null", onupdate="set null")),
Column("sub_equipment", INTEGER, ForeignKey("sao_equipment_data.id", ondelete="set null", onupdate="set null")),
Column("skill_slot1_skill_id", BIGINT, ForeignKey("sao_static_skill.SkillId", ondelete="set null", onupdate="set null")),
Column("skill_slot2_skill_id", BIGINT, ForeignKey("sao_static_skill.SkillId", ondelete="set null", onupdate="set null")),
Column("skill_slot3_skill_id", BIGINT, ForeignKey("sao_static_skill.SkillId", ondelete="set null", onupdate="set null")),