add migration for crypto support
This commit is contained in:
parent
c897275714
commit
c790456a87
2 changed files with 18 additions and 1 deletions
18
migrations/005-addCrypto.js
Normal file
18
migrations/005-addCrypto.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sqls = [
|
||||
'alter table transactions alter satoshis TYPE bigint',
|
||||
"alter table transactions add crypto_code text default 'BTC'",
|
||||
"alter table pending_transactions add crypto_code text default 'BTC'",
|
||||
'alter table pending_transactions alter satoshis TYPE bigint',
|
||||
"alter table bills add crypto_code text default 'BTC'",
|
||||
'alter table bills alter satoshis TYPE bigint'
|
||||
]
|
||||
|
||||
db.multi(sqls, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue