Compare commits

..

No commits in common. "88743898fe0bf620582b3e372e626d3d1c6e17da" and "83336cf0fa1ace1703c9c8986e9fef35a11bcf6c" have entirely different histories.

4 changed files with 4 additions and 10 deletions

3
db.go
View File

@ -113,7 +113,7 @@ func dbUpdate() (err error) {// {{{
return err return err
} }
for i := (schema+1); i <= DB_SCHEMA; i++ { for i := (schema+1); i <= DB_SCHEMA; i++ {
log.Printf("\x1b[32mNotes\x1b[0m Upgrading SQL schema to revision %d...", i) log.Printf("\x1b[32mNotes\x1b[0m Upgrading SQL schema to revision %d\n", i)
sql, _ := embedded.ReadFile( sql, _ := embedded.ReadFile(
fmt.Sprintf("sql/%04d.sql", i), fmt.Sprintf("sql/%04d.sql", i),
) )
@ -125,7 +125,6 @@ func dbUpdate() (err error) {// {{{
if err != nil { if err != nil {
return return
} }
log.Printf("\x1b[32mNotes\x1b[0m OK: %d", i)
} }
return return

View File

@ -20,9 +20,9 @@ import (
_ "embed" _ "embed"
) )
const VERSION = "v10"; const VERSION = "v9";
const LISTEN_HOST = "0.0.0.0"; const LISTEN_HOST = "0.0.0.0";
const DB_SCHEMA = 12 const DB_SCHEMA = 11
var ( var (
flagPort int flagPort int

View File

@ -386,10 +386,7 @@ func (session Session) SearchNodes(search string) (nodes []Node, err error) {//
FROM node FROM node
WHERE WHERE
crypto_key_id IS NULL AND crypto_key_id IS NULL AND
( content ~* $1
content ~* $1 OR
name ~* $1
)
ORDER BY ORDER BY
updated DESC updated DESC
`, search) `, search)

View File

@ -1,2 +0,0 @@
DROP INDEX node_content_index;
CREATE INDEX node_search_index ON node USING gin (name gin_trgm_ops, content gin_trgm_ops);