Switched migrations.py check for stake_currency back to open_rate, because stake_currency is no longer a variable

This commit is contained in:
Sam Germain 2021-07-04 23:51:58 -06:00
parent 42dbb1fb6b
commit e7612a7eff
2 changed files with 2 additions and 5 deletions

View File

@ -171,9 +171,8 @@ def check_migrate(engine, decl_base, previous_tables) -> None:
tabs = get_table_names_for_table(inspector, 'trades')
table_back_name = get_backup_name(tabs, 'trades_bak')
# Last added column of trades table
# To determine if migrations need to run
if not has_column(cols, 'collateral_currency'):
# Check for latest column
if not has_column(cols, 'open_trade_value'):
logger.info(f'Running database migration for trades - backup: {table_back_name}')
migrate_trades_table(decl_base, inspector, engine, table_back_name, cols)
# Reread columns - the above recreated the table!

View File

@ -956,7 +956,6 @@ def test_to_json(default_conf, fee):
'strategy': None,
'timeframe': None,
'exchange': 'binance',
'leverage': None,
'interest_rate': None,
'liquidation_price': None,
@ -1026,7 +1025,6 @@ def test_to_json(default_conf, fee):
'strategy': None,
'timeframe': None,
'exchange': 'binance',
'leverage': None,
'interest_rate': None,
'liquidation_price': None,