Setting document modified when created.
h3rald h3rald@h3rald.com
Fri, 15 May 2020 17:25:50 +0200
2 files changed,
4 insertions(+),
3 deletions(-)
M
src/litestorepkg/lib/core.nim
→
src/litestorepkg/lib/core.nim
@@ -297,8 +297,9 @@ # Store document
try: LOG.debug("Creating document '$1'" % id) store.begin() + let time = currentTime() var res = store.db.insertID(SQL_INSERT_DOCUMENT, id, data, contenttype, - binary, searchable, currentTime()) + binary, searchable, time, time) if res > 0: store.db.exec(SQL_INCREMENT_DOCS) if binary <= 0 and searchable >= 0:
M
src/litestorepkg/lib/queries.nim
→
src/litestorepkg/lib/queries.nim
@@ -101,8 +101,8 @@ """
const SQL_INSERT_DOCUMENT* = sql""" INSERT INTO documents -(id, data, content_type, binary, searchable, created) -VALUES (?, ?, ?, ?, ?, ?) +(id, data, content_type, binary, searchable, created, modified) +VALUES (?, ?, ?, ?, ?, ?, ?) """ const SQL_INSERT_SYSTEM_DOCUMENT* = sql"""