epoch times and msatoshi must be bigints

This commit is contained in:
kexkey
2021-11-22 13:21:57 -05:00
parent 2e2f5329a7
commit 9bfdfa0008
3 changed files with 22 additions and 16 deletions

View File

@@ -39,15 +39,15 @@ CREATE TABLE tx (
txid VARCHAR UNIQUE,
hash VARCHAR UNIQUE,
confirmations INTEGER DEFAULT 0,
timereceived INTEGER,
timereceived BIGINT,
fee REAL,
size INTEGER,
vsize INTEGER,
is_replaceable BOOLEAN,
blockhash VARCHAR,
blockheight INTEGER,
blocktime INTEGER,
conf_target INTEGER,
blocktime BIGINT,
conf_target SMALLINT,
inserted_ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_tx_timereceived ON tx (timereceived);
@@ -72,7 +72,7 @@ CREATE INDEX idx_watching_tx_tx_id ON watching_tx (tx_id);
CREATE TABLE batcher (
id SERIAL PRIMARY KEY,
label VARCHAR UNIQUE,
conf_target INTEGER,
conf_target SMALLINT,
feerate REAL,
inserted_ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
@@ -144,13 +144,13 @@ CREATE TABLE ln_invoice (
label VARCHAR UNIQUE,
bolt11 VARCHAR UNIQUE,
payment_hash VARCHAR,
msatoshi INTEGER,
msatoshi BIGINT,
status VARCHAR,
pay_index INTEGER,
msatoshi_received INTEGER,
paid_at INTEGER,
msatoshi_received BIGINT,
paid_at BIGINT,
description VARCHAR,
expires_at INTEGER,
expires_at BIGINT,
callback_url VARCHAR,
calledback BOOLEAN DEFAULT FALSE,
callback_failed BOOLEAN DEFAULT FALSE,