2
I need to change the attribute name of Heaviness for Pesoproduct, this is the code that is generated after executing the command add-Migration:
namespace Web.Dominio.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class alterar_Peso_para_PesoProduto_em_Produto : DbMigration
{
public override void Up()
{
AddColumn("dbo.Produto", "PesoProduto", c => c.Decimal(precision: 18, scale: 2));
DropColumn("dbo.Produto", "Peso");
}
public override void Down()
{
AddColumn("dbo.Produto", "Peso", c => c.Decimal(precision: 18, scale: 2));
DropColumn("dbo.Produto", "PesoProduto");
}
}
}
the problem is that the column data is deleted and I don’t want to delete the data I only want to change the name of the table attribute.