I need to change the name of the Weight attribute to Product Weight , this is the code that is generated after running the add-migration command:
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 data in the column is deleted and I do not want to delete the data I want to change only the name of the table attribute.