1
0
mirror of synced 2024-11-30 16:54:27 +01:00

sao: schema fixes 3: the misery never ends

This commit is contained in:
Kevin Trocolli 2024-06-26 23:01:47 -04:00
parent f27f789269
commit 5eb2ef8311

View File

@ -18,28 +18,26 @@ depends_on = None
def upgrade(): def upgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
op.add_column('sao_static_quest', sa.Column('QuestSceneId', sa.BIGINT(), nullable=False)) op.drop_table('sao_static_quest')
op.add_column('sao_static_quest', sa.Column('SortNo', sa.INTEGER(), nullable=False)) op.create_table('sao_static_quest',
op.add_column('sao_static_quest', sa.Column('Tutorial', sa.BOOLEAN(), nullable=False)) sa.Column('QuestSceneId', sa.BIGINT(), nullable=False),
op.add_column('sao_static_quest', sa.Column('ColRate', sa.DECIMAL(), nullable=False)) sa.Column('SortNo', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('LimitDefault', sa.INTEGER(), nullable=False)) sa.Column('Tutorial', sa.BOOLEAN(), nullable=False),
op.add_column('sao_static_quest', sa.Column('LimitResurrection', sa.INTEGER(), nullable=False)) sa.Column('ColRate', sa.DECIMAL(), nullable=False),
op.add_column('sao_static_quest', sa.Column('RewardTableSubId', sa.INTEGER(), nullable=False)) sa.Column('LimitDefault', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('PlayerTraceTableSubId', sa.INTEGER(), nullable=False)) sa.Column('LimitResurrection', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('SuccessPlayerExp', sa.INTEGER(), nullable=False)) sa.Column('RewardTableSubId', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('FailedPlayerExp', sa.INTEGER(), nullable=False)) sa.Column('PlayerTraceTableSubId', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('PairExpRate', sa.INTEGER(), nullable=False)) sa.Column('SuccessPlayerExp', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('TrioExpRate', sa.INTEGER(), nullable=False)) sa.Column('FailedPlayerExp', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('SingleRewardVp', sa.INTEGER(), nullable=False)) sa.Column('PairExpRate', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('PairRewardVp', sa.INTEGER(), nullable=False)) sa.Column('TrioExpRate', sa.INTEGER(), nullable=False),
op.add_column('sao_static_quest', sa.Column('TrioRewardVp', sa.INTEGER(), nullable=False)) sa.Column('SingleRewardVp', sa.INTEGER(), nullable=False),
op.drop_index('sao_static_quest_uk', table_name='sao_static_quest') sa.Column('PairRewardVp', sa.INTEGER(), nullable=False),
op.drop_column('sao_static_quest', 'id') sa.Column('TrioRewardVp', sa.INTEGER(), nullable=False),
op.drop_column('sao_static_quest', 'enabled') sa.PrimaryKeyConstraint('QuestSceneId'),
op.drop_column('sao_static_quest', 'version') mysql_charset='utf8mb4'
op.drop_column('sao_static_quest', 'questSceneId') )
op.drop_column('sao_static_quest', 'sortNo')
op.drop_column('sao_static_quest', 'name')
op.create_table('sao_static_property', op.create_table('sao_static_property',
sa.Column('PropertyId', sa.BIGINT(), nullable=False), sa.Column('PropertyId', sa.BIGINT(), nullable=False),
sa.Column('PropertyTargetType', sa.INTEGER(), nullable=False), sa.Column('PropertyTargetType', sa.INTEGER(), nullable=False),
@ -505,28 +503,6 @@ def upgrade():
def downgrade(): def downgrade():
# ### commands auto generated by Alembic - please adjust! ### # ### commands auto generated by Alembic - please adjust! ###
op.add_column('sao_static_quest', sa.Column('name', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
op.add_column('sao_static_quest', sa.Column('sortNo', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_quest', sa.Column('questSceneId', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_quest', sa.Column('version', mysql.INTEGER(), autoincrement=False, nullable=True))
op.add_column('sao_static_quest', sa.Column('enabled', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True))
op.add_column('sao_static_quest', sa.Column('id', mysql.INTEGER(), autoincrement=True, nullable=False))
op.create_index('sao_static_quest_uk', 'sao_static_quest', ['version', 'questSceneId'], unique=False)
op.drop_column('sao_static_quest', 'TrioRewardVp')
op.drop_column('sao_static_quest', 'PairRewardVp')
op.drop_column('sao_static_quest', 'SingleRewardVp')
op.drop_column('sao_static_quest', 'TrioExpRate')
op.drop_column('sao_static_quest', 'PairExpRate')
op.drop_column('sao_static_quest', 'FailedPlayerExp')
op.drop_column('sao_static_quest', 'SuccessPlayerExp')
op.drop_column('sao_static_quest', 'PlayerTraceTableSubId')
op.drop_column('sao_static_quest', 'RewardTableSubId')
op.drop_column('sao_static_quest', 'LimitResurrection')
op.drop_column('sao_static_quest', 'LimitDefault')
op.drop_column('sao_static_quest', 'ColRate')
op.drop_column('sao_static_quest', 'Tutorial')
op.drop_column('sao_static_quest', 'SortNo')
op.drop_column('sao_static_quest', 'QuestSceneId')
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('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('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('name', mysql.VARCHAR(charset='utf8mb3', collation='utf8mb3_unicode_ci', length=255), nullable=True))
@ -797,4 +773,16 @@ def downgrade():
op.drop_table('sao_static_skill') op.drop_table('sao_static_skill')
op.drop_table('sao_static_reward') op.drop_table('sao_static_reward')
op.drop_table('sao_static_property') op.drop_table('sao_static_property')
op.drop_table('sao_static_quest')
op.create_table('sao_static_quest',
sa.Column('id', mysql.INTEGER(), autoincrement=True, nullable=False),
sa.Column('enabled', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True),
sa.Column('version', mysql.INTEGER(), autoincrement=False, nullable=True),
sa.Column('questSceneId', mysql.INTEGER(), autoincrement=False, nullable=True),
sa.Column('sortNo', mysql.INTEGER(), autoincrement=False, nullable=True),
sa.Column('name', mysql.VARCHAR(charset='utf8mb4', collation='utf8mb4_general_ci', length=255), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint("version", "questSceneId", name="sao_static_quest_uk"),
mysql_charset='utf8mb4'
)
# ### end Alembic commands ### # ### end Alembic commands ###