Merge pull request #10053 from backstage/freben/better-sqlite-step-1

Do some groundwork for supporting the better-sqlite3 driver
This commit is contained in:
Fredrik Adelöw
2022-03-08 11:33:13 +01:00
committed by GitHub
12 changed files with 33 additions and 25 deletions
@@ -33,6 +33,7 @@ type DatabaseClient = 'pg' | 'sqlite3' | 'mysql' | 'mysql2' | string;
*/
const ConnectorMapping: Record<DatabaseClient, DatabaseConnector> = {
pg: pgConnector,
'better-sqlite3': sqlite3Connector,
sqlite3: sqlite3Connector,
mysql: mysqlConnector,
mysql2: mysqlConnector,
@@ -13,12 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import path from 'path';
import { ensureDirSync } from 'fs-extra';
import knexFactory, { Knex } from 'knex';
import { Config } from '@backstage/config';
import { ensureDirSync } from 'fs-extra';
import knexFactory, { Knex } from 'knex';
import path from 'path';
import { mergeDatabaseConfig } from '../config';
import { DatabaseConnector } from '../types';