fix: Add UNIQUE constraint to mining blocks table for turtle_id, block_type, and session_start
This commit is contained in:
@@ -96,7 +96,8 @@ export function initializeDatabase() {
|
|||||||
block_type TEXT NOT NULL,
|
block_type TEXT NOT NULL,
|
||||||
count INTEGER DEFAULT 1,
|
count INTEGER DEFAULT 1,
|
||||||
session_start INTEGER NOT NULL,
|
session_start INTEGER NOT NULL,
|
||||||
last_mined INTEGER NOT NULL
|
last_mined INTEGER NOT NULL,
|
||||||
|
UNIQUE(turtle_id, block_type, session_start)
|
||||||
)
|
)
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user