mirror of https://github.com/lidarr/Lidarr
DB now stores Artists. DB schema may need small tweaks.
This commit is contained in:
parent
f2a8336b31
commit
5ee1077e1e
|
@ -15,25 +15,24 @@ namespace NzbDrone.Core.Datastore.Migration
|
||||||
Create.TableForModel("Artist")
|
Create.TableForModel("Artist")
|
||||||
.WithColumn("ItunesId").AsInt32().Unique()
|
.WithColumn("ItunesId").AsInt32().Unique()
|
||||||
.WithColumn("ArtistName").AsString().Unique()
|
.WithColumn("ArtistName").AsString().Unique()
|
||||||
.WithColumn("ArtistSlug").AsString().Unique()
|
.WithColumn("ArtistSlug").AsString().Nullable() //.Unique()
|
||||||
.WithColumn("CleanTitle").AsString() // Do we need this?
|
.WithColumn("CleanTitle").AsString().Nullable() // Do we need this?
|
||||||
.WithColumn("Monitored").AsBoolean()
|
.WithColumn("Monitored").AsBoolean()
|
||||||
.WithColumn("AlbumFolder").AsBoolean()
|
.WithColumn("AlbumFolder").AsBoolean().Nullable()
|
||||||
.WithColumn("ArtistFolder").AsBoolean()
|
.WithColumn("ArtistFolder").AsBoolean().Nullable()
|
||||||
.WithColumn("LastInfoSync").AsDateTime().Nullable()
|
.WithColumn("LastInfoSync").AsDateTime().Nullable()
|
||||||
.WithColumn("LastDiskSync").AsDateTime().Nullable()
|
.WithColumn("LastDiskSync").AsDateTime().Nullable()
|
||||||
.WithColumn("Status").AsInt32()
|
.WithColumn("Status").AsInt32().Nullable()
|
||||||
.WithColumn("Path").AsString()
|
.WithColumn("Path").AsString()
|
||||||
.WithColumn("Images").AsString()
|
.WithColumn("Images").AsString().Nullable()
|
||||||
.WithColumn("QualityProfileId").AsInt32()
|
.WithColumn("QualityProfileId").AsInt32().Nullable()
|
||||||
.WithColumn("RootFolderPath").AsString()
|
.WithColumn("RootFolderPath").AsString().Nullable()
|
||||||
.WithColumn("Added").AsDateTime()
|
.WithColumn("Added").AsDateTime().Nullable()
|
||||||
.WithColumn("ProfileId").AsInt32() // This is either ProfileId or Profile
|
.WithColumn("ProfileId").AsInt32().Nullable() // This is either ProfileId or Profile
|
||||||
.WithColumn("Genres").AsString()
|
.WithColumn("Genres").AsString().Nullable()
|
||||||
.WithColumn("Albums").AsString()
|
.WithColumn("Albums").AsString().Nullable()
|
||||||
.WithColumn("Tags").AsString()
|
.WithColumn("Tags").AsString().Nullable()
|
||||||
.WithColumn("AddOptions").AsString()
|
.WithColumn("AddOptions").AsString().Nullable()
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
Create.TableForModel("Albums")
|
Create.TableForModel("Albums")
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace NzbDrone.Core.Datastore
|
||||||
Mapper.Entity<Artist>().RegisterModel("Artist")
|
Mapper.Entity<Artist>().RegisterModel("Artist")
|
||||||
.Ignore(s => s.RootFolderPath)
|
.Ignore(s => s.RootFolderPath)
|
||||||
.Relationship()
|
.Relationship()
|
||||||
.HasOne(s => s.Profile, s => s.ProfileId);
|
.HasOne(a => a.Profile, a => a.ProfileId);
|
||||||
|
|
||||||
Mapper.Entity<TrackFile>().RegisterModel("TrackFiles")
|
Mapper.Entity<TrackFile>().RegisterModel("TrackFiles")
|
||||||
.Ignore(f => f.Path)
|
.Ignore(f => f.Path)
|
||||||
|
|
Loading…
Reference in New Issue