feat: migrate old tx addresses to blacklist table
feat: add new addresses to blacklist list
This commit is contained in:
parent
60415e23f3
commit
f682a77eb5
2 changed files with 16 additions and 5 deletions
14
migrations/1624214428956-txs-addresses-to-blacklist.js
Normal file
14
migrations/1624214428956-txs-addresses-to-blacklist.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
`INSERT INTO blacklist SELECT DISTINCT crypto_code, to_address, false FROM cash_in_txs ON CONFLICT DO NOTHING`,
|
||||
`INSERT INTO blacklist SELECT DISTINCT crypto_code, to_address, false FROM cash_out_txs ON CONFLICT DO NOTHING`
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue