mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* schedule blocks in order * block minutes must be multiple of 15 * improve block minutes entry, validation and display * confirm deleting blocks and block groups * confirm deleting templates and template groups * skip unchanged blocks in playoutpull/1551/head
26 changed files with 29922 additions and 80 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Fix_BlockMinutes : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.Sql(@"UPDATE Block SET Minutes = CAST(CEILING(Minutes / 15.0) * 15 AS INT)"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,63 @@
@@ -0,0 +1,63 @@
|
||||
using System; |
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_PlayoutItemBlockKey : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<DateTime>( |
||||
name: "DateUpdated", |
||||
table: "Template", |
||||
type: "datetime(6)", |
||||
nullable: false, |
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
||||
migrationBuilder.AddColumn<DateTime>( |
||||
name: "DateUpdated", |
||||
table: "PlayoutTemplate", |
||||
type: "datetime(6)", |
||||
nullable: false, |
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
name: "BlockKey", |
||||
table: "PlayoutItem", |
||||
type: "longtext", |
||||
nullable: true) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
|
||||
migrationBuilder.AddColumn<DateTime>( |
||||
name: "DateUpdated", |
||||
table: "Block", |
||||
type: "datetime(6)", |
||||
nullable: false, |
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "DateUpdated", |
||||
table: "Template"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DateUpdated", |
||||
table: "PlayoutTemplate"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "BlockKey", |
||||
table: "PlayoutItem"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DateUpdated", |
||||
table: "Block"); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Reset_BlockPlayouts_BlockKey : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.Sql(@"DELETE FROM PlayoutHistory"); |
||||
migrationBuilder.Sql( |
||||
"""
|
||||
DELETE FROM PlayoutItem |
||||
WHERE PlayoutId IN (SELECT Id FROM Playout WHERE ProgramSchedulePlayoutType = 2) |
||||
""");
|
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Fix_BlockMinutes : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.Sql(@"UPDATE Block SET Minutes = CAST(CEILING(Minutes / 15.0) * 15 AS INT)"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,62 @@
@@ -0,0 +1,62 @@
|
||||
using System; |
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_PlayoutItemBlockKey : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<DateTime>( |
||||
name: "DateUpdated", |
||||
table: "Template", |
||||
type: "TEXT", |
||||
nullable: false, |
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
||||
migrationBuilder.AddColumn<DateTime>( |
||||
name: "DateUpdated", |
||||
table: "PlayoutTemplate", |
||||
type: "TEXT", |
||||
nullable: false, |
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
||||
migrationBuilder.AddColumn<string>( |
||||
name: "BlockKey", |
||||
table: "PlayoutItem", |
||||
type: "TEXT", |
||||
nullable: true); |
||||
|
||||
migrationBuilder.AddColumn<DateTime>( |
||||
name: "DateUpdated", |
||||
table: "Block", |
||||
type: "TEXT", |
||||
nullable: false, |
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "DateUpdated", |
||||
table: "Template"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DateUpdated", |
||||
table: "PlayoutTemplate"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "BlockKey", |
||||
table: "PlayoutItem"); |
||||
|
||||
migrationBuilder.DropColumn( |
||||
name: "DateUpdated", |
||||
table: "Block"); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Reset_BlockPlayouts_BlockKey : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.Sql(@"DELETE FROM PlayoutHistory"); |
||||
migrationBuilder.Sql( |
||||
"""
|
||||
DELETE FROM PlayoutItem |
||||
WHERE PlayoutId IN (SELECT Id FROM Playout WHERE ProgramSchedulePlayoutType = 2) |
||||
""");
|
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue