mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
updated history table
This commit is contained in:
parent
8467349305
commit
ca71025bca
13 changed files with 139 additions and 57 deletions
24
NzbDrone.Core/Datastore/Migration/004_updated_history.cs
Normal file
24
NzbDrone.Core/Datastore/Migration/004_updated_history.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Tags("")]
|
||||
[Migration(4)]
|
||||
public class updated_history : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Delete.Table("History");
|
||||
|
||||
|
||||
Create.TableForModel("History")
|
||||
.WithColumn("EpisodeId").AsInt32()
|
||||
.WithColumn("SeriesId").AsInt32()
|
||||
.WithColumn("SourceTitle").AsString()
|
||||
.WithColumn("Date").AsDateTime()
|
||||
.WithColumn("Quality").AsString()
|
||||
.WithColumn("Data").AsString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -40,9 +40,9 @@ namespace NzbDrone.Core.Datastore
|
|||
Mapper.Entity<History.History>().RegisterModel("History")
|
||||
.Relationships
|
||||
.AutoMapICollectionOrComplexProperties();
|
||||
// .Relationship();
|
||||
// .HasOne(h => h.Episode, h => h.EpisodeId)
|
||||
// .HasOne(h => h.Series, h => h.SeriesId);
|
||||
// .Relationship();
|
||||
// .HasOne(h => h.Episode, h => h.EpisodeId)
|
||||
// .HasOne(h => h.Series, h => h.SeriesId);
|
||||
|
||||
Mapper.Entity<Series>().RegisterModel("Series")
|
||||
.Ignore(s => s.RootFolderPath)
|
||||
|
@ -79,6 +79,7 @@ namespace NzbDrone.Core.Datastore
|
|||
MapRepository.Instance.RegisterTypeConverter(typeof(Boolean), new BooleanIntConverter());
|
||||
MapRepository.Instance.RegisterTypeConverter(typeof(Enum), new EnumIntConverter());
|
||||
MapRepository.Instance.RegisterTypeConverter(typeof(Quality), new QualityIntConverter());
|
||||
MapRepository.Instance.RegisterTypeConverter(typeof(Dictionary<string, string>), new EmbeddedDocumentConverter());
|
||||
}
|
||||
|
||||
private static void RegisterEmbeddedConverter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue