rdagumampan / yuniql

Free and open source schema versioning and database migration made natively with .NET/6. NEW THIS MAY 2022! v1.3.15 released!
https://yuniql.io
Apache License 2.0
417 stars 63 forks source link

Migrate sqlserver driver to use Microsoft.Data.SqlClient #224

Closed rdagumampan closed 2 years ago

rdagumampan commented 2 years ago

Hi @farazfaheem, sorry for delayed response, been busy lately on python and databricks :). I have investigated this and it seems related to the SqlClient I used. The issue could be fixed if I use Microsoft.Data.SqlClient. It can also be fixed if I dont use the SqlClient.SqlConnectionStringBuilder.

I dont have a fixed yet but as work around for now would be to use Sql Account. Please stay tune, I will pickup all these open bugs during my summer holiday in Mid May :)

Originally posted by @rdagumampan in https://github.com/rdagumampan/yuniql/issues/199#issuecomment-829420881

smitvora10 commented 2 years ago

Can i help with this to solve this issue?

rdagumampan commented 2 years ago

@smitvora10, thank you first for reaching out and yes are of course very much welcome to contribute :).

Here's a few steps to get you started, see if you can build and run tests locally https://github.com/rdagumampan/yuniql/wiki/Setup-development-environment

In case you missed it, please click the Start button and Fork to get clone. You can ask me questions here or in LinkedIn, I'll try to support you as much as I could possible do. Have a nice day // Rodel

rdagumampan commented 2 years ago

This issue is related to:

229 Setup Azure AD support

199 Failed connecting to Azure Sql Database

223 Upgrade solution to .NET 6 LTS

smitvora10 commented 2 years ago

Ok Rodel i will see what i can do and get back to you.

On Wed, Jan 12, 2022, 12:46 PM Rodel E. Dagumampan @.***> wrote:

This issue is related to:

229 https://github.com/rdagumampan/yuniql/issues/229 Setup Azure AD

support

199 https://github.com/rdagumampan/yuniql/issues/199 Failed connecting

to Azure Sql Database

223 https://github.com/rdagumampan/yuniql/issues/223 Upgrade solution

to .NET 6 LTS

— Reply to this email directly, view it on GitHub https://github.com/rdagumampan/yuniql/issues/224#issuecomment-1010714254, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHVHNP26YTZNNMWG5EHFULUVUTFRANCNFSM5LEFBIJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

pmelander commented 2 years ago

I have a Fork where I upgraded to Microsoft.Data.SqlClient and it seems to be working pretty straight forward. I was not able to get the tests running because of a locale issue, but I've successfully deployed to an Azure SQL Server using Active Directory Default authentication, which is not supported in System.Data.SqlClient.

Also, i'm not sure how you get the Microsoft.Data.SqlClient.SNI.dll packaged inside the executable. I usually don't have to worry about such things. But at least it's a feasible upgrade.

[CmdletBinding(DefaultParameterSetName = 'None')]
param
(
  [String] [Parameter(Mandatory = $true)] $ServerName,
  [String] [Parameter(Mandatory = $true)] $Database
)

.\yuniql.exe run --connection-string "Server=tcp:$ServerName,1433;Database=$Database;Authentication=Active Directory Default" --auto-create-db --environment "DEV"

image