Add suffix to plugin sqlite db file

Signed-off-by: Joe Porpeglia <josephp@spotify.com>
This commit is contained in:
Joe Porpeglia
2021-12-03 16:07:30 -05:00
parent 189ba4c340
commit e51369952e
2 changed files with 2 additions and 2 deletions
@@ -284,7 +284,7 @@ describe('DatabaseManager', () => {
// sqlite3 uses 'filename' instead of 'database'
expect(overrides).toHaveProperty(
'connection.filename',
`plugin_with_different_client/${pluginId}`,
`plugin_with_different_client/${pluginId}.sqlite`,
);
});
@@ -119,7 +119,7 @@ export class DatabaseManager {
// if persisting to a file, create separate files per plugin to avoid db migration issues.
if (sqliteFilename !== ':memory:') {
return `${sqliteFilename}/${pluginId}`;
return `${sqliteFilename}/${pluginId}.sqlite`;
}
// sqlite database name should fallback to ':memory:' as a special case