Is there an ORM / Framework that automatically converts data when I want to change the column type of a column in a table?

Suppose I have an existing database with existing data.

Is there any infrastructure / ORM that generates SQL data conversion scripts when I need the data type of the change column? Of course, there are problems with conversions such as

  • float to int
  • string to int

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

  • int swim
  • int for the string.

Should I always write SQL data conversion scripts in both cases?

+4
source share
6 answers

In the .Net world, I had very good experience with LLBLGen Pro . It supports the creation of DDL scripts to migrate the base database to updated entity definitions. Here is a quick start guide that shows how this works , and here is the documentation section for Model-First Design Process

You can use it with your own runtime or just as a design tool for Entity Framework, NHibernate, or Linq to SQL.

+3
source

SauceDB is written in .NET and is able to perform automatic schema changes when changing the data type on the access object.

http://sauce.codeplex.com

Disclamer: I wrote it

+3
source

There is EntityFramework.Migrations , for example.

+2
source

And another competitor: Propel Migrations

+2
source
+1
source

I would recommend DataObjects.Net .

Automatic updating works when we add new classes and properties to the model, but sometimes it is necessary to make some specific modifications to the scheme, for example, rename properties or classes, in which case you can write an update handler (RenameFieldHint, RemoveFieldHint, etc.)

+1
source

All Articles