mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Fix required fields in media.
This commit is contained in:
6856
Marechai.Database/Migrations/20200808014135_FixMediaRequiredFields.Designer.cs
generated
Normal file
6856
Marechai.Database/Migrations/20200808014135_FixMediaRequiredFields.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace Marechai.Database.Migrations
|
||||||
|
{
|
||||||
|
public partial class FixMediaRequiredFields : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder) =>
|
||||||
|
migrationBuilder.AlterColumn<string>("Title", "Media", nullable: false, oldClrType: typeof(string),
|
||||||
|
oldType: "varchar(255) CHARACTER SET utf8mb4", oldNullable: true);
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder) =>
|
||||||
|
migrationBuilder.AlterColumn<string>("Title", "Media", "varchar(255) CHARACTER SET utf8mb4", nullable: true,
|
||||||
|
oldClrType: typeof(string));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2060,7 +2060,7 @@ namespace Marechai.Database.Migrations
|
|||||||
|
|
||||||
b.Property<string>("TableOfContents").HasColumnType("json");
|
b.Property<string>("TableOfContents").HasColumnType("json");
|
||||||
|
|
||||||
b.Property<string>("Title").HasColumnType("varchar(255) CHARACTER SET utf8mb4");
|
b.Property<string>("Title").IsRequired().HasColumnType("varchar(255) CHARACTER SET utf8mb4");
|
||||||
|
|
||||||
b.Property<ushort?>("Tracks").HasColumnType("smallint unsigned");
|
b.Property<ushort?>("Tracks").HasColumnType("smallint unsigned");
|
||||||
|
|
||||||
|
|||||||
@@ -25,13 +25,15 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Aaru.CommonTypes;
|
using Aaru.CommonTypes;
|
||||||
|
|
||||||
namespace Marechai.Database.Models
|
namespace Marechai.Database.Models
|
||||||
{
|
{
|
||||||
public class Media : BaseModel<ulong>
|
public class Media : BaseModel<ulong>
|
||||||
{
|
{
|
||||||
public string Title { get; set; }
|
[Required]
|
||||||
|
public string Title { get; set; }
|
||||||
public ushort? Sequence { get; set; }
|
public ushort? Sequence { get; set; }
|
||||||
public ushort? LastSequence { get; set; }
|
public ushort? LastSequence { get; set; }
|
||||||
public MediaType Type { get; set; }
|
public MediaType Type { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user