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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);

View file

@ -129,7 +129,7 @@ export const schema = {
},
mysqldb: {
database: {
doc: 'MySQL Database',
doc: '[DEPRECATED] MySQL Database',
format: String,
default: 'n8n',
env: 'DB_MYSQLDB_DATABASE',