mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
fixup! Add next refresh date migration
This commit is contained in:
parent
e39337f8f1
commit
c4cd4ead44
@ -54,11 +54,17 @@ public partial class AddNextRefresh : Migration
|
||||
// language=PostgreSQL
|
||||
migrationBuilder.Sql(
|
||||
"""
|
||||
update episodes as e set external_id = jsonb_build_object(
|
||||
'ShowId', e.show_id,
|
||||
'SeasonNumber', e.season_number,
|
||||
'EpisodeNumber', e.episode_number,
|
||||
update episodes as e set external_id = (
|
||||
SELECT jsonb_build_object(
|
||||
'themoviedatabase', jsonb_build_object(
|
||||
'ShowId', s.external_id->'themoviedatabase'->'DataId',
|
||||
'Season', e.season_number,
|
||||
'Episode', e.episode_number,
|
||||
'Link', null
|
||||
)
|
||||
)
|
||||
FROM shows AS s
|
||||
WHERE s.id = e.show_id
|
||||
);
|
||||
"""
|
||||
);
|
||||
|
@ -82,6 +82,10 @@ public class PostgresContext(DbContextOptions options, IHttpContextAccessor acce
|
||||
typeof(Dictionary<string, MetadataId>),
|
||||
new JsonTypeHandler<Dictionary<string, MetadataId>>()
|
||||
);
|
||||
SqlMapper.AddTypeHandler(
|
||||
typeof(Dictionary<string, EpisodeId>),
|
||||
new JsonTypeHandler<Dictionary<string, EpisodeId>>()
|
||||
);
|
||||
SqlMapper.AddTypeHandler(
|
||||
typeof(Dictionary<string, string>),
|
||||
new JsonTypeHandler<Dictionary<string, string>>()
|
||||
|
Loading…
x
Reference in New Issue
Block a user