RootFolder removed from Series, going back to Path

This commit is contained in:
Mark McDowall 2013-05-23 21:10:56 -07:00
commit 95a9a297bc
14 changed files with 21 additions and 98 deletions

View file

@ -4,8 +4,8 @@ using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Tags("")]
[Migration(20130324)]
public class Migration20130324 : NzbDroneMigrationBase
[Migration(1)]
public class InitialSetup : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
@ -27,8 +27,7 @@ namespace NzbDrone.Core.Datastore.Migration
.WithColumn("Overview").AsString().Nullable()
.WithColumn("AirTime").AsString().Nullable()
.WithColumn("Images").AsString()
.WithColumn("RootFolderId").AsInt32()
.WithColumn("FolderName").AsString()
.WithColumn("Path").AsString()
.WithColumn("Monitored").AsBoolean()
.WithColumn("QualityProfileId").AsInt32()
.WithColumn("SeasonFolder").AsBoolean()
@ -83,7 +82,7 @@ namespace NzbDrone.Core.Datastore.Migration
.WithColumn("NzbInfoUrl").AsString().Nullable()
.WithColumn("ReleaseGroup").AsString().Nullable();
Create.TableForModel("NotificationDefinitions")
Create.TableForModel("Notifications")
.WithColumn("Name").AsString()
.WithColumn("OnGrab").AsBoolean()
.WithColumn("OnDownload").AsBoolean()
@ -95,7 +94,7 @@ namespace NzbDrone.Core.Datastore.Migration
.WithColumn("Interval").AsInt32()
.WithColumn("LastExecution").AsDateTime();
Create.TableForModel("IndexerDefinitions")
Create.TableForModel("Indexers")
.WithColumn("Enable").AsBoolean()
.WithColumn("Name").AsString().Unique()
.WithColumn("Implementation").AsString()

View file

@ -1,29 +0,0 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Tags("")]
[Migration(20130522)]
public class Migration20130522 : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Execute.Sql("DROP TABLE IF EXISTS NotificationDefinitions");
Rename.Table("IndexerDefinitions")
.To("Indexers");
Create.TableForModel("Notifications")
.WithColumn("Name").AsString()
.WithColumn("OnGrab").AsBoolean()
.WithColumn("OnDownload").AsBoolean()
.WithColumn("Settings").AsString()
.WithColumn("Implementation").AsString();
}
protected override void LogDbUpgrade()
{
}
}
}

View file

@ -47,9 +47,8 @@ namespace NzbDrone.Core.Datastore
// .HasOne(h => h.Series, h => h.SeriesId);
Mapper.Entity<Series>().RegisterModel("Series")
.Ignore(s => s.Path)
.Ignore(s => s.RootFolderPath)
.Relationship()
.HasOne(s => s.RootFolder, s => s.RootFolderId)
.HasOne(s => s.QualityProfile, s => s.QualityProfileId);
Mapper.Entity<Season>().RegisterModel("Seasons");