add ON CONFLICT REPLACE clause in messages

This commit is contained in:
vyzo 2023-03-16 17:25:20 +02:00 committed by Maciej Witowski
parent c04e0f4421
commit abdb12b450

View File

@ -26,7 +26,7 @@ var log = logging.Logger("msgindex")
var dbName = "msgindex.db"
var dbDefs = []string{
`CREATE TABLE IF NOT EXISTS messages (
cid VARCHAR(80) PRIMARY KEY,
cid VARCHAR(80) PRIMARY KEY ON CONFLICT REPLACE,
tipset_cid VARCHAR(80) NOT NULL,
epoch INTEGER NOT NULL
)`,