Add MariaDB support

This commit is contained in:
Jan Oberhauser
2020-04-14 19:54:11 +02:00
parent 7ab616f6bc
commit 303062623b
4 changed files with 7 additions and 6 deletions

View File

@@ -63,11 +63,12 @@ export async function init(synchronize?: boolean): Promise<IDatabaseCollections>
};
break;
case 'mariadb':
case 'mysqldb':
dbNotExistError = 'does not exist';
entities = MySQLDb;
connectionOptions = {
type: 'mysql',
type: dbType === 'mysqldb' ? 'mysql' : 'mariadb',
database: await GenericHelpers.getConfigValue('database.mysqldb.database') as string,
entityPrefix: await GenericHelpers.getConfigValue('database.tablePrefix') as string,
host: await GenericHelpers.getConfigValue('database.mysqldb.host') as string,