Im in the progress of upgrading my plugins from 4.2 to 4.3, and im curious on how to handle custom tables. Im able to retrive data from the db, but updating the dbentity does not seem to work. Do i have to uninstall the plugin in order to have the migration to update? If so, i would have to comment out deleting settings etc for old stores..? I see that uninstalling the plugin actually removes the table as well, so how can i prevent that if i need to reinstall in order to update migration?
I have the following class:
public class LogistraShippingInfo: BaseEntity
{
public int CarrierId { get; set; }
public string ShippingInfoId { get; set; }
public string Text { get; set; }
}
Ive manually created this:
Should i create this, or is it generated somehow?
[NopMigration("2020/05/29 12:00:00", "Custom.Logistra base schema")]
public class LogistraMigrationScheme : AutoReversingMigration
{
#region Fields
protected IMigrationManager _migrationManager;
#endregion
#region Ctor
public LogistraMigrationScheme(IMigrationManager migrationManager)
{
_migrationManager = migrationManager;
}
#endregion
#region Methods
/// <summary>
/// Collect the UP migration expressions
/// </summary>
public override void Up()
{
_migrationManager.BuildTable<LogistraShippingInfo>(Create);
}
#endregion
}