Efcore: Migrations: Data motion APIs

Created on 3 Jun 2016  路  5Comments  路  Source: dotnet/efcore

There is nothing that can help to manipulate with data with migrations:
basically it can be implemented like
migrationBuilder.Sql("Insert ...");
but would be grate to implement it like:
migrationBuilder.Insert.IntoTable("Users").Row(new { FirstName = "John", LastName = "Smith" });

there is a case why really need it this way:
there is a table Posts with string content column, but if I want a table Contents, so i want to add a table, select data, insert data and then delete column

type-enhancement

Most helpful comment

In addition to inserting, updating, and deleting data. This issue also covers transferring or moving data between tables and columns.

All 5 comments

@bricelam in triage we discusses that this was probably a dupe of an existing issue to support data motion functionality. Can you please help me find that issue? :smile:

Well, there's Work Item 16 on EF6 :smirk: Looks like it never made it to our EF Core backlog. We'll use this issue.

In addition to inserting, updating, and deleting data. This issue also covers transferring or moving data between tables and columns.

please consider sharding/partitioning data

Note, in version 2.0.0, we added InsertData(), UpdateData(), and DeleteData() migration operations.

Was this page helpful?
0 / 5 - 0 ratings