2019-05-18 23:05:54 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
2020-02-10 02:10:18 +00:00
|
|
|
|
namespace Marechai.Database.Migrations
|
2019-05-18 23:05:54 +01:00
|
|
|
|
{
|
|
|
|
|
|
public partial class NewsDateAsDateTime : Migration
|
|
|
|
|
|
{
|
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
|
{
|
|
|
|
|
|
migrationBuilder.AlterColumn<DateTime>("date", "news", "datetime", nullable: false,
|
|
|
|
|
|
oldClrType: typeof(string), oldType: "char(20)",
|
|
|
|
|
|
oldDefaultValueSql: "''");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
|
{
|
|
|
|
|
|
migrationBuilder.AlterColumn<string>("date", "news", "char(20)", nullable: false, defaultValueSql: "''",
|
|
|
|
|
|
oldClrType: typeof(DateTime), oldType: "datetime");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|