Michał Kuliński
Michał Kuliński

Reputation: 1976

Does exist ORM / Framework that converts data automatically when I want to change column datatype in table?

Assume that I have existing database with existing data.

Is there any framework / ORM that generates data conversion SQL scripts when I need change column datatype? Of course there is problem with conversions like

, but I would like to have such default functionality that automatically converts data from

Do I have always to write data SQL data conversion scripts in both cases?

Upvotes: 4

Views: 227

Answers (6)

Sergii
Sergii

Reputation: 1320

I would recommend DataObjects.Net.

Automatic upgrade works when we add new classes and properties to the model, but sometimes necessary to perform some specific schema modifications, for example rename of properties or classes, in this case you can write an upgrade handler(RenameFieldHint, RemoveFieldHint etc)

Upvotes: 1

iamkrillin
iamkrillin

Reputation: 6876

SauceDB is written in .NET and is capable of doing automatic schema modifications when you change the data type on an access object.

http://sauce.codeplex.com

Disclamer: I wrote it

Upvotes: 3

Michał Kuliński
Michał Kuliński

Reputation: 1976

And another competitor: Propel Migrations

Upvotes: 2

Michał Kuliński
Michał Kuliński

Reputation: 1976

What about Doctrine Migrations

Upvotes: 1

Steve P
Steve P

Reputation: 19397

In the .Net world I've had very good experience with LLBLGen Pro. It supports the generation of DDL scripts to migrate the underlying database to the updated entity definitions. Here is quick start guide that shows the overview of how this works, and here is documentation section for Model-First design process

You can either use it with its own runtime framework, or simply as a design tool for Entity Framework, NHibernate, or Linq to SQL.

Upvotes: 3

Michał Kuliński
Michał Kuliński

Reputation: 1976

There is EntityFramework.Migrations for example.

Upvotes: 2

Related Questions