v12.0.0 - initial commit
This commit is contained in:
commit
e2c49ea43c
1145 changed files with 97211 additions and 0 deletions
20
packages/server/migrations/025-create_trades.js
Normal file
20
packages/server/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.runAll(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue