TrustListTrustComment TEXT\\r
);");\r
\r
+ db->Execute("CREATE INDEX IF NOT EXISTS idxPeerTrust_IdentityID ON tblPeerTrust (IdentityID);");\r
+ db->Execute("CREATE INDEX IF NOT EXISTS idxPeerTrust_TargetIdentityID ON tblPeerTrust (TargetIdentityID);");\r
+\r
db->Execute("CREATE TABLE IF NOT EXISTS tblBoard(\\r
BoardID INTEGER PRIMARY KEY,\\r
BoardName TEXT UNIQUE,\\r
MessageIndex INTEGER\\r
);");\r
\r
+ db->Execute("CREATE INDEX IF NOT EXISTS idxMessage_IdentityID ON tblMessage (IdentityID);");\r
+\r
db->Execute("CREATE TABLE IF NOT EXISTS tblMessageReplyTo(\\r
MessageID INTEGER,\\r
ReplyToMessageUUID TEXT,\\r
BoardID INTEGER\\r
);");\r
\r
+ db->Execute("CREATE INDEX IF NOT EXISTS idxMessageBoard_BoardID ON tblMessageBoard (BoardID);");\r
+\r
db->Execute("CREATE TABLE IF NOT EXISTS tblMessageListRequests(\\r
IdentityID INTEGER,\\r
Day DATE,\\r
GROUP BY tblBoard.BoardID;");\r
\r
// calculates peer trust\r
- // do the (MessageTrust+1)*LocalTrustListTrust/(MessageTrust+1)/100.0 - so it MessageTrust or TrustListTrust is NULL, the calc will be NULL and it won't be included at all in the average\r
+ // do the (MessageTrust+1)*LocalTrustListTrust/(MessageTrust+1)/100.0 - so if MessageTrust or TrustListTrust is NULL, the calc will be NULL and it won't be included at all in the average\r
// need the +1 so that when the values are 0 the result is not 0\r
db->Execute("DROP VIEW IF EXISTS vwCalculatedPeerTrust;");\r
db->Execute("CREATE VIEW IF NOT EXISTS vwCalculatedPeerTrust AS \\r
\r
date.SetToGMTime();\r
// insert SomeDude's public key\r
- db->Execute("INSERT INTO tblIdentity(PublicKey,DateAdded,LocalTrustListTrust) VALUES('SSK@NuBL7aaJ6Cn4fB7GXFb9Zfi8w1FhPyW3oKgU9TweZMw,iXez4j3qCpd596TxXiJgZyTq9o-CElEuJxm~jNNZAuA,AQACAAE/','"+date.Format("%Y-%m-%d %H:%M:%S")+"',51);");\r
+ db->Execute("INSERT INTO tblIdentity(PublicKey,DateAdded,LocalTrustListTrust) VALUES('SSK@NuBL7aaJ6Cn4fB7GXFb9Zfi8w1FhPyW3oKgU9TweZMw,iXez4j3qCpd596TxXiJgZyTq9o-CElEuJxm~jNNZAuA,AQACAAE/','"+date.Format("%Y-%m-%d %H:%M:%S")+"',50);");\r
// insert Shadow Panther's public key\r
db->Execute("INSERT INTO tblIdentity(PublicKey,DateAdded) VALUES('SSK@~mimyB1kmH4f7Cgsd2wM2Qv2NxrZHRMM6IY8~7EWRVQ,fxTKkR0TYhgMYb-vEGAv55sMOxCGD2xhE4ZxWHxdPz4,AQACAAE/','"+date.Format("%Y-%m-%d %H:%M:%S")+"');");\r
// insert garfield's public key\r