Skip to content

Commit

Permalink
PRIMARY key updated - SQLite and Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
ABresting committed Nov 22, 2023
1 parent 2f3473d commit 3b1aa4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ proc createTableQuery(): string =
" id VARCHAR NOT NULL," &
" messageHash VARCHAR NOT NULL," &
" storedAt BIGINT NOT NULL," &
" CONSTRAINT messageIndex PRIMARY KEY (storedAt, messageHash)" &
" CONSTRAINT messageIndex PRIMARY KEY (messageHash)" &
");"

const InsertRowStmtName = "InsertRow"
Expand Down
2 changes: 1 addition & 1 deletion waku/waku_archive/driver/sqlite_driver/queries.nim
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ proc createTableQuery(table: string): SqlQueryStr =
" id BLOB," &
" messageHash BLOB," &
" storedAt INTEGER NOT NULL," &
" CONSTRAINT messageIndex PRIMARY KEY (storedAt, messageHash)" &
" CONSTRAINT messageIndex PRIMARY KEY (messageHash)" &
") WITHOUT ROWID;"

proc createTable*(db: SqliteDatabase): DatabaseResult[void] =
Expand Down

0 comments on commit 3b1aa4d

Please sign in to comment.