Fixes in pg migration and computer's speed

This commit is contained in:
kexkey
2021-12-14 20:50:08 -05:00
parent 305fa86bb8
commit 35fbc2761e
5 changed files with 19 additions and 18 deletions

View File

@@ -77,7 +77,7 @@ CREATE TABLE batcher (
inserted_ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO batcher (id, label, conf_target, feerate) VALUES (1, 'default', 6, NULL);
SELECT SETVAL('batcher_id_seq', 1);
SELECT SETVAL('batcher_id_seq', 1);
CREATE TABLE recipient (
id SERIAL PRIMARY KEY,
@@ -110,7 +110,7 @@ CREATE TABLE watching_by_txid (
inserted_ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_watching_by_txid_txid ON watching_by_txid (txid);
CREATE UNIQUE INDEX idx_watching_by_txid_1x ON watching_by_txid (txid, callback1conf, callbackxconf);
CREATE UNIQUE INDEX idx_watching_by_txid_1x ON watching_by_txid (txid, COALESCE(callback1conf, ''), COALESCE(callbackxconf, ''));
CREATE INDEX idx_watching_by_txid_watching ON watching_by_txid (watching);
CREATE INDEX idx_watching_by_txid_callback1conf ON watching_by_txid (callback1conf);
CREATE INDEX idx_watching_by_txid_calledback1conf ON watching_by_txid (calledback1conf);
@@ -139,7 +139,7 @@ CREATE UNIQUE INDEX idx_cp_propval ON cyphernode_props (property, value);
INSERT INTO cyphernode_props (id, property, value) VALUES (1, 'version', '0.1');
INSERT INTO cyphernode_props (id, property, value) VALUES (2, 'pay_index', '0');
SELECT SETVAL('cyphernode_props_id_seq', 2);
SELECT SETVAL('cyphernode_props_id_seq', 2);
CREATE TABLE ln_invoice (
id SERIAL PRIMARY KEY,