New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pg enhancements #224

Merged
merged 4 commits into from Oct 11, 2017

Conversation

Projects
None yet
3 participants
@drusellers
Member

drusellers commented Oct 26, 2015

This is a series of commits that i needed to make postgres work on the Mac OS using Mono.

Closes #223

description=".Net Framework Data Provider for Postgres"
type="Npgsql.NpgsqlFactory, Npgsql, Version=3.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>
</DbProviderFactories>
</system.data>

This comment has been minimized.

@ferventcoder

ferventcoder Oct 26, 2015

Member

What is this? How does it affect other databases?

@ferventcoder

ferventcoder Oct 26, 2015

Member

What is this? How does it affect other databases?

This comment has been minimized.

@drusellers

drusellers Oct 26, 2015

Member

This is what is required to use https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse/databases/AdoNetDatabase.cs#L31. We are telling System.Data.DbProviderFactories that we have a factory called Npgsql (which comes from https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.databases.postgresql/PostgreSQLDatabase.cs#L86). Npgsql implements the required interface.

To my knowledge, this would need to be done for all other database types. You can see something similar for MySql here - https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.databases.mysql/MySqlDatabase.cs#L81

Oracle: https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.databases.oracle/OracleDatabase.cs#L87

Some can be registered in the machine config by installers, in this case I'm just adding it for just this application.

@drusellers

drusellers Oct 26, 2015

Member

This is what is required to use https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse/databases/AdoNetDatabase.cs#L31. We are telling System.Data.DbProviderFactories that we have a factory called Npgsql (which comes from https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.databases.postgresql/PostgreSQLDatabase.cs#L86). Npgsql implements the required interface.

To my knowledge, this would need to be done for all other database types. You can see something similar for MySql here - https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.databases.mysql/MySqlDatabase.cs#L81

Oracle: https://github.com/chucknorris/roundhouse/blob/master/product/roundhouse.databases.oracle/OracleDatabase.cs#L87

Some can be registered in the machine config by installers, in this case I'm just adding it for just this application.

This comment has been minimized.

@ferventcoder

ferventcoder Oct 26, 2015

Member

Would it be possible to put it in the class itself? If not totally understand. I think there was a reason I left it out of the config itself. I think the purpose was to try to be as agnostic as possible in the console/msbuild/lib.

@ferventcoder

ferventcoder Oct 26, 2015

Member

Would it be possible to put it in the class itself? If not totally understand. I think there was a reason I left it out of the config itself. I think the purpose was to try to be as agnostic as possible in the console/msbuild/lib.

This comment has been minimized.

@ferventcoder

ferventcoder Oct 26, 2015

Member

To my knowledge, if this value is here, it won't work with roundhouse.lib, which will only have roundhouse.dll.

@ferventcoder

ferventcoder Oct 26, 2015

Member

To my knowledge, if this value is here, it won't work with roundhouse.lib, which will only have roundhouse.dll.

This comment has been minimized.

@drusellers

drusellers Oct 26, 2015

Member

DbProviderFactories only supports get methods. GetFactory and GetFactoryClasses. It looks like you would have to get down and dirty to add programmatically http://stackoverflow.com/questions/1117683/add-a-dbproviderfactory-without-an-app-config

@drusellers

drusellers Oct 26, 2015

Member

DbProviderFactories only supports get methods. GetFactory and GetFactoryClasses. It looks like you would have to get down and dirty to add programmatically http://stackoverflow.com/questions/1117683/add-a-dbproviderfactory-without-an-app-config

This comment has been minimized.

@drusellers

drusellers May 19, 2016

Member

Seeing the same commit over in #186 for MySQL - we will probably want to build something like is in the above link via a separate pull request and then we can DRY all of that up.

@drusellers

drusellers May 19, 2016

Member

Seeing the same commit over in #186 for MySQL - we will probably want to build something like is in the above link via a separate pull request and then we can DRY all of that up.

drusellers added some commits Oct 26, 2015

#223 correcting the connection string for PGSQL
Based on https://www.connectionstrings.com/npgsql/standard/

We should be using different keys. Instead of more
string hard coding I'm leveraging the connection
string builder that comes with Npgsql.
@drusellers

This comment has been minimized.

Show comment
Hide comment
@drusellers

drusellers May 19, 2016

Member

@ChrisMissal @ferventcoder what's left that is blocking this from coming in. Looking to get PGSQL + Mono rocking.

Member

drusellers commented May 19, 2016

@ChrisMissal @ferventcoder what's left that is blocking this from coming in. Looking to get PGSQL + Mono rocking.

@ferventcoder

This comment has been minimized.

Show comment
Hide comment
@ferventcoder

ferventcoder May 19, 2016

Member

This could be good to go. If you are comfortable with it, merge it and do some real testing with it. The worst that could come of it is that we have to back out the changes.

Member

ferventcoder commented May 19, 2016

This could be good to go. If you are comfortable with it, merge it and do some real testing with it. The worst that could come of it is that we have to back out the changes.

@BiggerNoise BiggerNoise merged commit 78d58b2 into chucknorris:master Oct 11, 2017

2 checks passed

RoundhousE - Professional Database Change Mgmt (http://projectroundhouse.org) (ChuckNorris) - merge TeamCity build finished
Details
continuous-integration/teamcity Finished TeamCity Build ChuckNorris :: RoundhousE - Professional Database Change Mgmt (http://projectroundhouse.org) : Running
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment