remove the unused dropDatabase in the connector

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-08-30 13:46:40 +02:00
parent fd66330d4a
commit e46754a18b
5 changed files with 0 additions and 20 deletions
@@ -26,11 +26,9 @@ describe('DatabaseManagerImpl', () => {
it('calls the right connector, only once per plugin id', async () => {
const connector1 = {
getClient: jest.fn(),
dropDatabase: jest.fn(),
} satisfies Connector;
const connector2 = {
getClient: jest.fn(),
dropDatabase: jest.fn(),
} satisfies Connector;
const impl = new DatabaseManagerImpl(
@@ -62,11 +60,9 @@ describe('DatabaseManagerImpl', () => {
it('respects per-plugin overridden connectors', async () => {
const connector1 = {
getClient: jest.fn(),
dropDatabase: jest.fn(),
} satisfies Connector;
const connector2 = {
getClient: jest.fn(),
dropDatabase: jest.fn(),
} satisfies Connector;
const impl = new DatabaseManagerImpl(
@@ -99,7 +95,6 @@ describe('DatabaseManagerImpl', () => {
it('migration skip options take precedence over config', async () => {
const connector = {
getClient: jest.fn(),
dropDatabase: jest.fn(),
} satisfies Connector;
const impl = new DatabaseManagerImpl(
@@ -133,7 +128,6 @@ describe('DatabaseManagerImpl', () => {
it('plugin can skip migrations using config', async () => {
const connector = {
getClient: jest.fn(),
dropDatabase: jest.fn(),
} satisfies Connector;
const impl = new DatabaseManagerImpl(
@@ -293,10 +293,6 @@ export class MysqlConnector implements Connector {
return client;
}
async dropDatabase(...databaseNames: string[]): Promise<void> {
return await dropMysqlDatabase(this.config, ...databaseNames);
}
/**
* Provides the canonical database name for a given plugin.
*
@@ -312,10 +312,6 @@ export class PgConnector implements Connector {
return client;
}
async dropDatabase(...databaseNames: string[]): Promise<void> {
return await dropPgDatabase(this.config, ...databaseNames);
}
/**
* Provides the canonical database name for a given plugin.
*
@@ -210,10 +210,6 @@ export class Sqlite3Connector implements Connector {
return client;
}
async dropDatabase(..._databaseNames: string[]): Promise<void> {
// do nothing
}
/**
* Provides the canonical database name for a given plugin.
*
@@ -30,6 +30,4 @@ export interface Connector {
pluginMetadata: PluginMetadataService;
},
): Promise<Knex>;
dropDatabase(...databaseNames: string[]): Promise<void>;
}