Commit ebd7a27f authored by Yucheng's avatar Yucheng

switch names for table outright and outright_tmp

parent d99cf0c5
......@@ -1920,8 +1920,8 @@ class Gogoal(Base):
tcap = Column(Float(53))
class Outright(Base):
__tablename__ = 'outright'
class OutrightTmp(Base):
__tablename__ = 'outright_tmp'
__table_args__ = (
Index('outright_trade_date_code_portfolio_name_uindex', 'trade_date', 'code', 'portfolio_name', unique=True),
)
......@@ -1932,8 +1932,8 @@ class Outright(Base):
volume = Column(Integer, nullable=False)
class OutrightTmp(Base):
__tablename__ = 'outright_tmp'
class Outright(Base):
__tablename__ = 'outright'
__table_args__ = (
Index('outright_trade_id_trade_date_code_portfolio_name_uindex', 'trade_id', 'trade_date', 'code',
'portfolio_name', unique=True),
......
......@@ -33,7 +33,7 @@ from alphamind.data.dbmodel.models import Formulas
from alphamind.data.dbmodel.models import DailyPortfoliosSchedule
from alphamind.data.dbmodel.models import Performance
from alphamind.data.dbmodel.models import Positions
from alphamind.data.dbmodel.models import OutrightTmp
from alphamind.data.dbmodel.models import Outright
from alphamind.data.transformer import Transformer
from alphamind.model.loader import load_model
from alphamind.formula.utilities import encode_formula
......@@ -796,7 +796,7 @@ class SqlEngine(object):
dtype={'weight': sa.types.JSON})
def fetch_outright_status(self, ref_date: str, is_open=True):
table = OutrightTmp
table = Outright
if is_open:
id_filter = 'notin_'
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment