Constraints

10 Foreign Key Constraints

Constraint Name Child Column Parent Column Delete Rule
gain_loss_algo_run_id_fkey
gain_loss.algo_run_id
algo_run.algo_run_id
Restrict delete
account_transactions_account_id_fkey
account_transactions.account_id
accounts.account_id
Restrict delete
trade_analysis_algo_run_id_fkey
trade_analysis.algo_run_id
algo_run.algo_run_id
Restrict delete
algo_run_ref_algo_run_fkey
algo_run.ref_algo_run
algo_run.algo_run_id
Restrict delete
trade_plan_execution_audit_trade_plan_id_fkey
trade_plan_execution_audit.trade_plan_id
trade_plan.trade_plan_id
Restrict delete
new_trades_algo_run_id_fkey
new_trades.algo_run_id
algo_run.algo_run_id
Restrict delete
trade_plan_portfolio_id_fkey
trade_plan.portfolio_id
portfolio.portfolio_id
Restrict delete
portfolio_batch_ids_portfolio_id_fkey
portfolio_batch_ids.portfolio_id
portfolio.portfolio_id
Restrict delete
trades_algo_run_id_fkey
trades.algo_run_id
algo_run.algo_run_id
Restrict delete
portfolio_account_id_fkey
portfolio.account_id
accounts.account_id
Restrict delete

Check Constraints

Table Constraint Name Constraint
accounts accounts_check (((credit_line > (0)::double precision) OR (NOT allow_negative)))
trades trades_qty_check ((qty > 0))