refactor: Add deprecation notice for MySQL and MariaDB (#6189)

* refactor: Add deprecation notice for MySQL and MariaDB

* Update packages/cli/src/commands/BaseCommand.ts

Co-authored-by: Cornelius Suermann <cornelius@n8n.io>

---------

Co-authored-by: Cornelius Suermann <cornelius@n8n.io>
This commit is contained in:
Omar Ajoue
2023-05-08 12:16:20 +02:00
committed by GitHub
parent ee582cc3bd
commit 0673a39fa0
2 changed files with 9 additions and 1 deletions

View File

@@ -55,6 +55,14 @@ export abstract class BaseCommand extends Command {
this.exitWithCrash('There was an error initializing DB', error),
);
const dbType = config.getEnv('database.type');
if (['mysqldb', 'mariadb'].includes(dbType)) {
LoggerProxy.warn(
'Support for MySQL/MariaDB has been deprecated and will be removed with an upcoming version of n8n. Please migrate to PostgreSQL.',
);
}
this.instanceId = this.userSettings.instanceId ?? '';
await Container.get(PostHogClient).init(this.instanceId);
await Container.get(InternalHooks).init(this.instanceId);