mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Set news date as DateTime.
This commit is contained in:
1919
Cicm.Database/Migrations/20190518212800_NewsDateAsDateTime.Designer.cs
generated
Normal file
1919
Cicm.Database/Migrations/20190518212800_NewsDateAsDateTime.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Cicm.Database.Migrations
|
||||
{
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -498,8 +498,7 @@ namespace Cicm.Database.Migrations
|
||||
b.Property<int>("AddedId").ValueGeneratedOnAdd().HasColumnName("added_id").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
b.Property<string>("Date").IsRequired().ValueGeneratedOnAdd().HasColumnName("date")
|
||||
.HasColumnType("char(20)").HasDefaultValueSql("''");
|
||||
b.Property<DateTime>("Date").HasColumnName("date").HasColumnType("datetime");
|
||||
|
||||
b.Property<int>("Type").ValueGeneratedOnAdd().HasColumnName("type").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
Reference in New Issue
Block a user