Skip to content

Feature Request / Allow passing SSL options for database connection when importing #1796

@thekevinbrown

Description

@thekevinbrown

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions