From 177f8513685b6662c88ca2f8419c25833459da02 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Thu, 27 Jun 2024 00:07:10 -0400 Subject: [PATCH] sao: cleanup --- .../alembic/versions/680789dabab3_sao_player_changes.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/data/alembic/versions/680789dabab3_sao_player_changes.py b/core/data/alembic/versions/680789dabab3_sao_player_changes.py index 4fb953e..d65f725 100644 --- a/core/data/alembic/versions/680789dabab3_sao_player_changes.py +++ b/core/data/alembic/versions/680789dabab3_sao_player_changes.py @@ -101,9 +101,6 @@ def upgrade(): new_column_name="hero_log_id", type_=sa.BIGINT(), nullable=False) - op.drop_index('sao_hero_log_data_ibfk_1', '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', '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') @@ -116,7 +113,6 @@ def upgrade(): 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.create_foreign_key(None, "sao_hero_log_data", "aime_user", ['user'], ['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') @@ -193,7 +189,6 @@ def downgrade(): new_column_name="user_hero_log_id", type_=sa.Integer(), nullable=False) - op.drop_constraint("sao_hero_log_data_ibfk_1", 'sao_hero_log_data', type_='foreignkey') op.drop_constraint("sao_hero_log_data_ibfk_2", 'sao_hero_log_data', type_='foreignkey') op.drop_constraint("sao_hero_log_data_ibfk_3", 'sao_hero_log_data', type_='foreignkey') op.drop_constraint("sao_hero_log_data_ibfk_4", 'sao_hero_log_data', type_='foreignkey') @@ -206,9 +201,6 @@ def downgrade(): op.drop_constraint("sao_hero_log_data_ibfk_11", 'sao_hero_log_data', type_='foreignkey') op.drop_constraint("sao_hero_log_data_ibfk_12", 'sao_hero_log_data', type_='foreignkey') op.drop_constraint("sao_hero_log_data_ibfk_13", '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.create_foreign_key(None, "sao_hero_log_data", "aime_user", ['user'], ['id']) op.alter_column('sao_hero_log_data', 'get_date', existing_type=mysql.TIMESTAMP(), server_default=sa.text('CURRENT_TIMESTAMP'),