Lots of development
This commit is contained in:
parent
5cbec6bd23
commit
3a244f691e
19 changed files with 594 additions and 837 deletions
20
migrations/025-create_trades.js
Normal file
20
migrations/025-create_trades.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
"create type trade_type as enum ('buy', 'sell')",
|
||||
`create table trades (
|
||||
id serial PRIMARY KEY,
|
||||
type trade_type not null,
|
||||
crypto_code text not null,
|
||||
crypto_atoms bigint not null,
|
||||
fiat_code text not null,
|
||||
created timestamptz NOT NULL default now()
|
||||
)`
|
||||
]
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue