dbdeploy.net icon indicating copy to clipboard operation
dbdeploy.net copied to clipboard

Specific version of MySql.Data Dependency

Open efaruk opened this issue 10 years ago • 11 comments

You have used ilmerge to merge required assemblies but this is not a good practice in this case. Because you have referenced specific version of MySql.Data (Actually all referenced 3rd parties are same). If have more up-to-date version of MySql on my system, this won't work.

<provider name="mysql" description="MySQL, MySQL provider 1.0.7.30072" assemblyName="MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionClass="MySql.Data.MySqlClient.MySqlConnection" />

You can remove "Version=1.0.7.30072," par of the assemblyName registration. There is no difference for you because important part is PublicKeyToken.

I'm strongly encouraging you to remove version information from assemblyName registration.

Also, you guys need well formed documentation very very badly... I'have rebuilt (directly from vs in debug mode) the project to override dependencies with what I have currently. But unfortunately its not working... It shows, job done, but actually it is not. There is no table created... dbdeploy

But I'm strongly recommend you guys publish your work with dependencies without merging in it. You don't have any inexperienced customers...

Thanks, regards... efaruk

efaruk avatar Jul 22 '14 19:07 efaruk

Hi,

I was just doing some work and I think I'll have a better solution for you. Instead of just relying on the merged dbproviders.xml, we'll be able to place a dbproviders.xml either together with the assembly or the current path and it should pick those up instead of the embedded version.

This should allow you to override without having to recompile.

As far as documentation, I won't make any promises, but we can try to improve it. If you care to take a stab at it, feel free to contribute some documentation.

As your bug, you mention mysql, but you're using mssql in the screenshot. Is that correct?

brunomlopes avatar Sep 27 '14 20:09 brunomlopes

Actually, I'll follow through and not include a version on the default assembly. I'm testing internally how this works out.

brunomlopes avatar Sep 29 '14 11:09 brunomlopes

Actually, I tried both, on mysql I had reference specific version issue which I mentioned and second issue with mssql is (screen shot) tool says it succeed the process but it is not...

Thanks, Regards... EFP

On Sat, Sep 27, 2014 at 11:33 PM, Bruno Lopes [email protected] wrote:

Hi,

I was just doing some work and I think I'll have a better solution for you. Instead of just relying on the merged dbproviders.xml, we'll be able to place a dbproviders.xml either together with the assembly or the current path and it should pick those up instead of the embedded version.

This should allow you to override without having to recompile.

As far as documentation, I won't make any promises, but we can try to improve it. If you care to take a stab at it, feel free to contribute some documentation.

As your bug, you mention mysql, but you're using mssql in the screenshot. Is that correct?

— Reply to this email directly or view it on GitHub https://github.com/brunomlopes/dbdeploy.net/issues/7#issuecomment-57064836 .

efaruk avatar Oct 22 '14 08:10 efaruk

Hi, I have try this tool, after assemblyBinding for the latest MySql.Data assembly version.

But I'm getting "Incorrect table definition; there can be only one auto column and it must be defined as a key" when trying to create ChangeLog table.

Do you know why? Am I doing something wrong? Does this tool really work with MySql server?

Thanks

gapin avatar Dec 11 '15 18:12 gapin

Hi @gapin, Can you confirm which version of mysql you're using on the server side so I can try to reproduce on my end?

Thanks

brunomlopes avatar Dec 14 '15 09:12 brunomlopes

Hi @brunomlopes! The MySql server version is 5.6.19.

Thanks

gapin avatar Dec 14 '15 12:12 gapin

Bruno?

gapin avatar Dec 28 '15 21:12 gapin

Apologies. I did some changes and it should now work, but I don't work regularly with mysql. Can you give the version up at https://bintray.com/brunomlopes/generic/dbdeploy.NET/2.2.0.4/view?sort=&order=#filesa go?

brunomlopes avatar Jan 02 '16 00:01 brunomlopes

Hi Bruno! I needed to change from: @"INSERT INTO {0} (Folder, ScriptNumber, ScriptName, StartDate, CompleteDate, AppliedBy, ScriptStatus, ScriptOutput) VALUES (@1, @2, @3, {1}, {2}, {3}, @4, @5) \r\n SELECT ChangeId FROM {0} WHERE Folder = @1 and ScriptNumber = @2", To: @"INSERT INTO {0} (Folder, ScriptNumber, ScriptName, StartDate, CompleteDate, AppliedBy, ScriptStatus, ScriptOutput) VALUES (@1, @2, @3, {1}, {2}, {3}, @4, @5); SELECT ChangeId FROM {0} WHERE Folder = @1 and ScriptNumber = @2",

And it seems to work now... I'll try harder later and keep you updated!

Thanks!

gapin avatar Jan 03 '16 20:01 gapin

Great!

Where did you change that? It looks like it should use the default delimiter there, I think.

On Sun, Jan 3, 2016 at 8:10 PM, gapin [email protected] wrote:

Hi Bruno! I needed to change from: @"INSERT INTO {0} (Folder, ScriptNumber, ScriptName, StartDate, CompleteDate, AppliedBy, ScriptStatus, ScriptOutput) VALUES (@1 https://github.com/1, @2 https://github.com/2, @3 https://github.com/3, {1}, {2}, {3}, @4 https://github.com/4, @5 https://github.com/5) \r\n SELECT ChangeId FROM {0} WHERE Folder = @1 https://github.com/1 and ScriptNumber = @2 https://github.com/2", To: @"INSERT INTO {0} (Folder, ScriptNumber, ScriptName, StartDate, CompleteDate, AppliedBy, ScriptStatus, ScriptOutput) VALUES (@1 https://github.com/1, @2 https://github.com/2, @3 https://github.com/3, {1}, {2}, {3}, @4 https://github.com/4, @5 https://github.com/5); SELECT ChangeId FROM {0} WHERE Folder = @1 https://github.com/1 and ScriptNumber = @2 https://github.com/2",

And it seems to work now... I'll try harder later and keep you updated!

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/brunomlopes/dbdeploy.net/issues/7#issuecomment-168537024 .

brunomlopes avatar Jan 04 '16 01:01 brunomlopes

Yes, that's right! \dbdeploy.net\src\Net.Sf.Dbdeploy\Database\DatabaseSchemaVersionManager.cs (line 133)

Thanks!

gapin avatar Jan 04 '16 01:01 gapin