mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
✨ Add support for PostgresDB and save date as Date
This commit is contained in:
@@ -18,6 +18,7 @@ import * as config from './../config';
|
||||
|
||||
import {
|
||||
MongoDb,
|
||||
PostgresDb,
|
||||
SQLite,
|
||||
} from './databases';
|
||||
|
||||
@@ -43,6 +44,16 @@ export async function init(): Promise<IDatabaseCollections> {
|
||||
url: config.get('database.mongodb.connectionUrl') as string,
|
||||
useNewUrlParser: true,
|
||||
};
|
||||
} else if (dbType === 'postgresdb') {
|
||||
entities = PostgresDb;
|
||||
connectionOptions = {
|
||||
type: 'postgres',
|
||||
database: config.get('database.postgresdb.database'),
|
||||
host: config.get('database.postgresdb.host'),
|
||||
password: config.get('database.postgresdb.password'),
|
||||
port: config.get('database.postgresdb.port'),
|
||||
username: config.get('database.postgresdb.user'),
|
||||
};
|
||||
} else if (dbType === 'sqlite') {
|
||||
entities = SQLite;
|
||||
connectionOptions = {
|
||||
|
||||
Reference in New Issue
Block a user