From c790456a8789ee441e345c7027d08d466d8f9f3a Mon Sep 17 00:00:00 2001 From: Josh Harvey Date: Mon, 11 Apr 2016 17:09:35 +0200 Subject: [PATCH] add migration for crypto support --- migrations/005-addCrypto.js | 18 ++++++++++++++++++ todo.txt | 1 - 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 migrations/005-addCrypto.js diff --git a/migrations/005-addCrypto.js b/migrations/005-addCrypto.js new file mode 100644 index 00000000..eaa551c7 --- /dev/null +++ b/migrations/005-addCrypto.js @@ -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() +} diff --git a/todo.txt b/todo.txt index 3f235870..cddca56c 100644 --- a/todo.txt +++ b/todo.txt @@ -31,7 +31,6 @@ alter table bills add crypto_code text default 'BTC'; alter table bills alter satoshis TYPE bigint; - handle geth send failure better -- unlock geth account - remove debug - implement coin selection screen - ask neal to work on config scripts