dradovic / MigSharp

Mig# (MigSharp) is a .NET framework for database migrations and versioning
Other
106 stars 34 forks source link

Creating RowVersion\Timestamp columns in SQL CE 4 #28

Closed AceHack closed 13 years ago

AceHack commented 13 years ago

Is this possible, if not can it be. Thanks so much.

dradovic commented 13 years ago

I assume, your question is if it is possible to create a table with columns of datatype RowVersion/Timestamp, correct?

If you look at Mig#'s API, you will notice that datatypes are always specified using the ADO.NET DbType enumeration which does not have members for RowVersion/Timestamp. The reason for that is that one of Mig#'s main purposes is to be able to write cross-platform compatible migrations. We have the need, to run the same migration on Oracle and on SQL Server. If you start using features that are specific to only one platform, the portability of your migrations is subverted.

If you still want to go down this road, you can always emit custom SQL to do whatever you want (as shown in the manual).

dradovic commented 13 years ago

Closed as special case of #29.