mirror of https://github.com/ErsatzTV/ErsatzTV.git
22 changed files with 15737 additions and 45 deletions
@ -1,3 +1,3 @@
@@ -1,3 +1,3 @@
|
||||
namespace ErsatzTV.Application.Images; |
||||
|
||||
public record UpdateImageFolderDuration(int LibraryFolderId, int? ImageFolderDuration) : IRequest<int?>; |
||||
public record UpdateImageFolderDuration(int LibraryFolderId, double? ImageFolderDuration) : IRequest<double?>; |
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata; |
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_ImageFolderDuration : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.CreateTable( |
||||
name: "ImageFolderDuration", |
||||
columns: table => new |
||||
{ |
||||
Id = table.Column<int>(type: "int", nullable: false) |
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), |
||||
LibraryFolderId = table.Column<int>(type: "int", nullable: false), |
||||
DurationSeconds = table.Column<int>(type: "int", nullable: false) |
||||
}, |
||||
constraints: table => |
||||
{ |
||||
table.PrimaryKey("PK_ImageFolderDuration", x => x.Id); |
||||
table.ForeignKey( |
||||
name: "FK_ImageFolderDuration_LibraryFolder_LibraryFolderId", |
||||
column: x => x.LibraryFolderId, |
||||
principalTable: "LibraryFolder", |
||||
principalColumn: "Id", |
||||
onDelete: ReferentialAction.Cascade); |
||||
}) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
||||
migrationBuilder.CreateIndex( |
||||
name: "IX_ImageFolderDuration_LibraryFolderId", |
||||
table: "ImageFolderDuration", |
||||
column: "LibraryFolderId", |
||||
unique: true); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropTable( |
||||
name: "ImageFolderDuration"); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Update_ImageFolderDuration : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AlterColumn<double>( |
||||
name: "DurationSeconds", |
||||
table: "ImageMetadata", |
||||
type: "double", |
||||
nullable: true, |
||||
oldClrType: typeof(int), |
||||
oldType: "int", |
||||
oldNullable: true); |
||||
|
||||
migrationBuilder.AlterColumn<double>( |
||||
name: "DurationSeconds", |
||||
table: "ImageFolderDuration", |
||||
type: "double", |
||||
nullable: false, |
||||
oldClrType: typeof(int), |
||||
oldType: "int"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AlterColumn<int>( |
||||
name: "DurationSeconds", |
||||
table: "ImageMetadata", |
||||
type: "int", |
||||
nullable: true, |
||||
oldClrType: typeof(double), |
||||
oldType: "double", |
||||
oldNullable: true); |
||||
|
||||
migrationBuilder.AlterColumn<int>( |
||||
name: "DurationSeconds", |
||||
table: "ImageFolderDuration", |
||||
type: "int", |
||||
nullable: false, |
||||
oldClrType: typeof(double), |
||||
oldType: "double"); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Update_ImageFolderDuration : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AlterColumn<double>( |
||||
name: "DurationSeconds", |
||||
table: "ImageMetadata", |
||||
type: "REAL", |
||||
nullable: true, |
||||
oldClrType: typeof(int), |
||||
oldType: "INTEGER", |
||||
oldNullable: true); |
||||
|
||||
migrationBuilder.AlterColumn<double>( |
||||
name: "DurationSeconds", |
||||
table: "ImageFolderDuration", |
||||
type: "REAL", |
||||
nullable: false, |
||||
oldClrType: typeof(int), |
||||
oldType: "INTEGER"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AlterColumn<int>( |
||||
name: "DurationSeconds", |
||||
table: "ImageMetadata", |
||||
type: "INTEGER", |
||||
nullable: true, |
||||
oldClrType: typeof(double), |
||||
oldType: "REAL", |
||||
oldNullable: true); |
||||
|
||||
migrationBuilder.AlterColumn<int>( |
||||
name: "DurationSeconds", |
||||
table: "ImageFolderDuration", |
||||
type: "INTEGER", |
||||
nullable: false, |
||||
oldClrType: typeof(double), |
||||
oldType: "REAL"); |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue