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'");
|
||||
|
||||
@@ -28,12 +28,14 @@
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System;
|
||||
|
||||
namespace Cicm.Database.Models
|
||||
{
|
||||
public class News
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Date { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public NewsType Type { get; set; }
|
||||
public int AddedId { get; set; }
|
||||
}
|
||||
|
||||
@@ -557,8 +557,7 @@ namespace Cicm.Database.Models
|
||||
entity.Property(e => e.AddedId).HasColumnName("added_id").HasColumnType("int(11)")
|
||||
.HasDefaultValueSql("'0'");
|
||||
|
||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("char(20)")
|
||||
.HasDefaultValueSql("''");
|
||||
entity.Property(e => e.Date).IsRequired().HasColumnName("date").HasColumnType("datetime");
|
||||
|
||||
entity.Property(e => e.Type).HasColumnName("type").HasColumnType("int(11)").HasDefaultValueSql("'0'");
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<Version>3.0.99.437</Version>
|
||||
<Version>3.0.99.441</Version>
|
||||
<Company>Canary Islands Computer Museum</Company>
|
||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||
<Product>Canary Islands Computer Museum Website</Product>
|
||||
|
||||
Reference in New Issue
Block a user