mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Add genres migrations
This commit is contained in:
parent
de2308f319
commit
1b4d1ef45e
1380
back/src/Kyoo.Postgresql/Migrations/20240401213942_AddGenres.Designer.cs
generated
Normal file
1380
back/src/Kyoo.Postgresql/Migrations/20240401213942_AddGenres.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,53 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Kyoo.Postgresql.Migrations;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddGenres : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder
|
||||||
|
.AlterDatabase()
|
||||||
|
.Annotation(
|
||||||
|
"Npgsql:Enum:genre",
|
||||||
|
"action,adventure,animation,comedy,crime,documentary,drama,family,fantasy,history,horror,music,mystery,romance,science_fiction,thriller,war,western,kids,news,reality,soap,talk,politics"
|
||||||
|
)
|
||||||
|
.Annotation("Npgsql:Enum:status", "unknown,finished,airing,planned")
|
||||||
|
.Annotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted")
|
||||||
|
.OldAnnotation(
|
||||||
|
"Npgsql:Enum:genre",
|
||||||
|
"action,adventure,animation,comedy,crime,documentary,drama,family,fantasy,history,horror,music,mystery,romance,science_fiction,thriller,war,western"
|
||||||
|
)
|
||||||
|
.OldAnnotation("Npgsql:Enum:status", "unknown,finished,airing,planned")
|
||||||
|
.OldAnnotation(
|
||||||
|
"Npgsql:Enum:watch_status",
|
||||||
|
"completed,watching,droped,planned,deleted"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder
|
||||||
|
.AlterDatabase()
|
||||||
|
.Annotation(
|
||||||
|
"Npgsql:Enum:genre",
|
||||||
|
"action,adventure,animation,comedy,crime,documentary,drama,family,fantasy,history,horror,music,mystery,romance,science_fiction,thriller,war,western"
|
||||||
|
)
|
||||||
|
.Annotation("Npgsql:Enum:status", "unknown,finished,airing,planned")
|
||||||
|
.Annotation("Npgsql:Enum:watch_status", "completed,watching,droped,planned,deleted")
|
||||||
|
.OldAnnotation(
|
||||||
|
"Npgsql:Enum:genre",
|
||||||
|
"action,adventure,animation,comedy,crime,documentary,drama,family,fantasy,history,horror,music,mystery,romance,science_fiction,thriller,war,western,kids,news,reality,soap,talk,politics"
|
||||||
|
)
|
||||||
|
.OldAnnotation("Npgsql:Enum:status", "unknown,finished,airing,planned")
|
||||||
|
.OldAnnotation(
|
||||||
|
"Npgsql:Enum:watch_status",
|
||||||
|
"completed,watching,droped,planned,deleted"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -22,7 +22,7 @@ namespace Kyoo.Postgresql.Migrations
|
|||||||
.HasAnnotation("ProductVersion", "8.0.3")
|
.HasAnnotation("ProductVersion", "8.0.3")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "genre", new[] { "action", "adventure", "animation", "comedy", "crime", "documentary", "drama", "family", "fantasy", "history", "horror", "music", "mystery", "romance", "science_fiction", "thriller", "war", "western" });
|
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "genre", new[] { "action", "adventure", "animation", "comedy", "crime", "documentary", "drama", "family", "fantasy", "history", "horror", "music", "mystery", "romance", "science_fiction", "thriller", "war", "western", "kids", "news", "reality", "soap", "talk", "politics" });
|
||||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "status", new[] { "unknown", "finished", "airing", "planned" });
|
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "status", new[] { "unknown", "finished", "airing", "planned" });
|
||||||
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "watch_status", new[] { "completed", "watching", "droped", "planned", "deleted" });
|
NpgsqlModelBuilderExtensions.HasPostgresEnum(modelBuilder, "watch_status", new[] { "completed", "watching", "droped", "planned", "deleted" });
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
@ -252,7 +252,7 @@ namespace Kyoo.Postgresql.Migrations
|
|||||||
.HasColumnType("json")
|
.HasColumnType("json")
|
||||||
.HasColumnName("external_id");
|
.HasColumnName("external_id");
|
||||||
|
|
||||||
b.Property<Genre[]>("Genres")
|
b.Property<List<Genre>>("Genres")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("genre[]")
|
.HasColumnType("genre[]")
|
||||||
.HasColumnName("genres");
|
.HasColumnName("genres");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user