diff options
| author | Zephyrrus <[email protected]> | 2021-01-08 00:41:43 +0200 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2021-01-08 00:41:43 +0200 |
| commit | b58e12cad888389b8ae69b6d36357390f35a727d (patch) | |
| tree | b427becf78c51081e58f1b2af98b2662f7626a39 /src/api/structures/Database.js | |
| parent | fix: don't generate a stat every second on minute 0 of every hour (diff) | |
| download | host.fuwn.me-b58e12cad888389b8ae69b6d36357390f35a727d.tar.xz host.fuwn.me-b58e12cad888389b8ae69b6d36357390f35a727d.zip | |
fix: pg driver doesn't return anything without .returning()
feat: disable .returning() is not supported warning message, it's useless.
Diffstat (limited to 'src/api/structures/Database.js')
| -rw-r--r-- | src/api/structures/Database.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/structures/Database.js b/src/api/structures/Database.js index 5818452..39632a1 100644 --- a/src/api/structures/Database.js +++ b/src/api/structures/Database.js @@ -40,6 +40,12 @@ const db = Knex({ return result; }, useNullAsDefault: process.env.DB_CLIENT === 'sqlite3', + log: { + warn: msg => { + if (typeof msg === 'string' && msg.startsWith('.returning()')) return; + console.warn(msg); + } + }, userParams: { lastMutationTime: null } |