I really wish these errors would just point out the exact mismatch rather than dumping a fairly hard to read schema.
Alright, lets start over with a clean one. This will remove bandwidth stats, but shouldn’t impact payout. (bandwidth orders for payout are stored and sent from elsewhere)
-
Stop the node
-
Rename the bandwidth.db file to something like bandwidth.db-bak
-
Run with your path
sqlite3 /your/path/to/bandwidth.db
Create new empty tables.
CREATE TABLE bandwidth_usage (
satellite_id BLOB NOT NULL,
action INTEGER NOT NULL,
amount BIGINT NOT NULL,
created_at TIMESTAMP NOT NULL
);
CREATE TABLE bandwidth_usage_rollups (
interval_start TIMESTAMP NOT NULL,
satellite_id BLOB NOT NULL,
action INTEGER NOT NULL,
amount BIGINT NOT NULL,
PRIMARY KEY ( interval_start, satellite_id, action )
);
CREATE INDEX idx_bandwidth_usage_satellite ON bandwidth_usage(satellite_id);
CREATE INDEX idx_bandwidth_usage_created ON bandwidth_usage(created_at);
- Exit sqlite
.quit
- Start node