Hardcode Go default empty response
This commit is contained in:
@@ -40,11 +40,10 @@ CREATE TABLE IF NOT EXISTS agent_activity (
|
||||
`
|
||||
|
||||
// defaultSettings seeds initial values; OR IGNORE means existing rows are unchanged.
|
||||
const defaultSettings = `
|
||||
INSERT OR IGNORE INTO settings (key, value) VALUES ('default_wait_seconds', '10');
|
||||
INSERT OR IGNORE INTO settings (key, value) VALUES ('default_empty_response', '');
|
||||
INSERT OR IGNORE INTO settings (key, value) VALUES ('agent_stale_after_seconds','30');
|
||||
`
|
||||
const defaultSettings = "" +
|
||||
"INSERT OR IGNORE INTO settings (key, value) VALUES ('default_wait_seconds', '10');\n" +
|
||||
"INSERT OR IGNORE INTO settings (key, value) VALUES ('agent_stale_after_seconds', '30');\n" +
|
||||
"DELETE FROM settings WHERE key = 'default_empty_response';\n"
|
||||
|
||||
// Open opens (creating if necessary) a SQLite database at dbPath, applies the
|
||||
// schema, and seeds default settings.
|
||||
@@ -74,4 +73,3 @@ func Open(dbPath string) (*sql.DB, error) {
|
||||
|
||||
return db, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user