49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using NetTopologySuite.Geometries;
|
|
|
|
#nullable disable
|
|
|
|
namespace gehGassi.Persistence.Migrations
|
|
{
|
|
public partial class NewsLocationAdded : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Lat",
|
|
table: "News");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Lng",
|
|
table: "News");
|
|
|
|
migrationBuilder.AddColumn<Point>(
|
|
name: "Location",
|
|
table: "News",
|
|
type: "geography",
|
|
nullable: true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Location",
|
|
table: "News");
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "Lat",
|
|
table: "News",
|
|
type: "float",
|
|
nullable: false,
|
|
defaultValue: 0.0);
|
|
|
|
migrationBuilder.AddColumn<double>(
|
|
name: "Lng",
|
|
table: "News",
|
|
type: "float",
|
|
nullable: false,
|
|
defaultValue: 0.0);
|
|
}
|
|
}
|
|
}
|