refactor: remove extra conditions and fields renaming
This commit is contained in:
parent
b0bbb2983f
commit
0c0133d01c
2 changed files with 21 additions and 31 deletions
|
|
@ -3,14 +3,14 @@ const db = require('./db')
|
|||
exports.up = function (next) {
|
||||
var sql = [
|
||||
`CREATE TABLE cashout_tx_trades (
|
||||
cash_out_tx_id uuid REFERENCES cash_out_txs(id),
|
||||
tx_id uuid REFERENCES cash_out_txs(id),
|
||||
trade_id serial REFERENCES trades(id),
|
||||
CONSTRAINT cashout_trade_pkey PRIMARY KEY (cash_out_tx_id,trade_id)
|
||||
CONSTRAINT cashout_trade_pkey PRIMARY KEY (tx_id,trade_id)
|
||||
)`,
|
||||
`CREATE TABLE cashin_tx_trades (
|
||||
cash_in_tx_id uuid REFERENCES cash_in_txs(id),
|
||||
tx_id uuid REFERENCES cash_in_txs(id),
|
||||
trade_id serial REFERENCES trades(id),
|
||||
CONSTRAINT cashin_trade_pkey PRIMARY KEY (cash_in_tx_id,trade_id)
|
||||
CONSTRAINT cashin_trade_pkey PRIMARY KEY (tx_id,trade_id)
|
||||
)`
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue