LinuxDoku / migratordotnet

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

Can't use TransformationProvider.this[] to tell apart dialects #123

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Right now, telling apart classic SQL Server from SQL Server CE does not
work with TransformationProvider.this[] due to the simple definition of
TransformationProvider.IsThisProvider. As some SQL Server commands don't
work with CE, this can pose a problem for developers who are building
migrations that should work across various versions of SQL Server (and/or
other database projects).

The attached patch redefines IsThisProvider in
SqlServerTransformationProvider, in such a way that the various different
database dialects supported can be told apart. This may cause issues for
migrations where dialect is unimportant, however; a better solution still
needs to be found.

Original issue reported on code.google.com by colda...@gmail.com on 15 Jul 2009 at 5:39

Attachments:

GoogleCodeExporter commented 8 years ago
Ah, another possible (and better) solution: rename class SqlServerDialect to
SqlServerPureDialect, and use this patch so that
TransformationProvider.IsThisProvider checks dialect instead of provider name. 
In
this case, "SqlServer" will match any SQL Server dialect, but "SqlServerPure" 
will
match only the "pure" one.

Original comment by colda...@gmail.com on 15 Jul 2009 at 5:43

Attachments:

GoogleCodeExporter commented 8 years ago
This patch includes the change from the previous patch, as well as changes 
related to
renaming Migrator.Providers.SqlServer.SqlServerDialect to SqlServerPureDialect. 
I'm
now using these changes to tell apart SQL Server dialects, but further testing 
is
probably required to make sure things work fine with other databases as well.

Original comment by colda...@gmail.com on 15 Jul 2009 at 6:02

Attachments: