Imports against non-SSL databases (like local ones) work well currently, but there are use cases where it'd be great to be able to have the import connect to databases with SSL on. Configurations in database.ts normally look like:
export const connection: ConnectionOptions = {
connectionManagerId: 'postgresql',
mikroOrmConfig: {
entities,
driver: PostgreSqlDriver,
driverOptions: {
connection: { ssl: { ca: apSoutheast2Certificates } },
},
},
};
or
export const connection: ConnectionOptions = {
connectionManagerId: 'postgresql',
mikroOrmConfig: {
entities,
driver: PostgreSqlDriver,
driverOptions: {
connection: { ssl: true },
},
},
};
Developers should be able to configure these SSL options including passing CA certificates in a simple way for imports.