LinuxDoku / migratordotnet

Automatically exported from code.google.com/p/migratordotnet
0 stars 0 forks source link

Support for SQL Server CE #25

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I didn't try it yet but i was wondering if SQL Server support implies 
support on SQL Server CE or if this should be a wishing list option?

Thanks in advance.

Gustavo.

Original issue reported on code.google.com by gustavo.ringel@gmail.com on 9 Jun 2008 at 8:08

GoogleCodeExporter commented 8 years ago
It is for sure not a defect, it was intented to be an Enhancement...but i don't 
see 
the option to update it :(

Original comment by gustavo.ringel@gmail.com on 9 Jun 2008 at 8:10

GoogleCodeExporter commented 8 years ago
I'm pretty sure the dialects are the same.

If you want to derive from SqlServerTransformationProvider creating 
SqlServerCeTransformationProvider and we can use the same dialect as SqlServer.

This would be going down the same route that we need to use to support Sql 
Server 
2005 specific things stated in another issue. This way we can use the same 
method 
for both approaches.

If you don't have time I will get to this later tonight or tomorrow.

Thanks!

Original comment by dko...@gmail.com on 9 Jun 2008 at 12:54

GoogleCodeExporter commented 8 years ago
I will try to do this also later. I'm correcting and testing another problem i 
reported after this...
Regretfully the description was not so right there after looking at the code, 
but i 
cannot manager to edit my messages or change priorities...is this a right 
issues or 
google issue?

Original comment by gustavo.ringel@gmail.com on 9 Jun 2008 at 1:00

GoogleCodeExporter commented 8 years ago

Original comment by geoffl...@gmail.com on 11 Jun 2008 at 2:59

GoogleCodeExporter commented 8 years ago

Original comment by geoffl...@gmail.com on 11 Jun 2008 at 2:59

GoogleCodeExporter commented 8 years ago
Here i have a patch for SQLCerverCe. I used a new Dialect, i took the 
properties for 
ce dialect as defined in NHibernate which also has a different dialect for CE.
You have to apply the patch and copy the System.Data.SqlServerCe.dll to the lib 
directory
I'm failing at four tests now:
AddCheck and RemoveCheck: Not supported (at least didn't found how to do it)
RenameColumn and Table: sp_rename it's not supported. 

I didn't mark as ignored the tests since i'm looking workarounds and hoping you 
may 
know how to solve the problems...

Gustavo.

Original comment by gustavo.ringel@gmail.com on 11 Jun 2008 at 7:32

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by geoffl...@gmail.com on 12 Jun 2008 at 7:34

GoogleCodeExporter commented 8 years ago
Ok, Take 2. Now i pass every supported test there are two unsupported that are 
set 
as ignored there.
Changes:
1) Added SqlServerCeDialect (Inherits from SqlServerDialect)
2) Added SqlServerCeTransformationProvider (Inherits from 
SqlTransformationProvider)
and SqlServerCeTransformationProviderTests
3) a) Changed SqlTransformationProvider when possible to use INFORMATIONSCHEMA 
tables to avoid duplication of code
   b) Virtualized the connection constructor so i can create a new SqlCeConnection 
on construction of the SqlCeTransformationProvider
4) Created in the TransformationProvider base class a GetColumnByName 
method...used 
for RenameColumn in SqlServerCe
5) Changed in PostgreSQLTransformotationProvider the GetColumnByName to support 
lowered-case search of the column-name
6) Changed default.build file to copy and compile where needed with the 
System.Data.SqlCerver.dll need to connect to SqlCe
7) Changed app.config file to add  the connection string 
8) Vitualized RenameTable of TransformationProviderBase so it can be ignored by 
sql.
9) Changed TransformationProvider null test to use GetColumnByName instead of 
foreach Column...

Original comment by gustavo.ringel@gmail.com on 13 Jun 2008 at 1:23

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the new patch, I'll take a look at it.

Is it safe to assume that this doesn't work on Mono?
We might need to #ifdef this one out on that platform?

Original comment by geoffl...@gmail.com on 13 Jun 2008 at 3:18

GoogleCodeExporter commented 8 years ago
I don't know the answer about Mono, i think the same as you, but i will check 
out...i'll ask some NHibernate commiters if they know about someone that 
used/tried 
their SqlServerCe Driver in mono...

Original comment by gustavo.ringel@gmail.com on 13 Jun 2008 at 3:26

GoogleCodeExporter commented 8 years ago
Seems like it uses PIvoke internally, so probably no-go with Mono. But it should
still be able to compile it so I'm not too worried about it.

Applied the patch - I liked this one a lot better - thanks for doing the extra 
work.
Added a couple of extra test cases.

Original comment by geoffl...@gmail.com on 13 Jun 2008 at 4:23