Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

LonLatUpdateMigration.cs

using FluentMigrator;
using Nop.Data.Migrations;
using Nop.Plugin.Pickup.PickupInStore.Domain;

namespace Nop.Plugin.Pickup.PickupInStore.Data.Migrations;

[NopMigration("2024-05-29 00:00:00", "Pickup.PickupInStore 4.70.7. Increase precision of Longitude/Latitude fields", MigrationProcessType.Update)]
public class LonLatUpdateMigration : MigrationBase
{
    #region Methods

    /// 
    /// Collect the UP migration expressions
    /// 
    public override void Up()
    {
        Alter.Table(nameof(StorePickupPoint))
            .AlterColumn(nameof(StorePickupPoint.Latitude))
                .AsDecimal(18, 8)
                .Nullable();

        Alter.Table(nameof(StorePickupPoint))
            .AlterColumn(nameof(StorePickupPoint.Longitude))
                .AsDecimal(18, 8)
                .Nullable();
    }

    /// 
    /// Collects the DOWN migration expressions
    /// 
    public override void Down()
    {
        //nothing
    }

    #endregion
}