You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/src/NzbDrone.Core/Datastore/Migration/181_list_movies_table.cs

45 lines
2.0 KiB

using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(181)]
public class list_movies_table : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Rename.Table("NetImport").To("ImportLists");
Rename.Table("NetImportStatus").To("ImportListStatus");
Execute.Sql("UPDATE \"Config\" SET \"Key\" = 'importlistsyncinterval' WHERE \"Key\" = 'netimportsyncinterval'");
Alter.Table("ImportLists").AddColumn("SearchOnAdd").AsBoolean().WithDefaultValue(false);
Create.TableForModel("ImportListMovies")
.WithColumn("ImdbId").AsString().Nullable()
.WithColumn("TmdbId").AsInt32()
.WithColumn("ListId").AsInt32()
.WithColumn("Title").AsString()
.WithColumn("SortTitle").AsString().Nullable()
.WithColumn("Status").AsInt32()
.WithColumn("Overview").AsString().Nullable()
.WithColumn("Images").AsString()
.WithColumn("LastInfoSync").AsDateTime().Nullable()
.WithColumn("Runtime").AsInt32()
.WithColumn("InCinemas").AsDateTime().Nullable()
.WithColumn("Year").AsInt32().Nullable()
.WithColumn("Ratings").AsString().Nullable()
.WithColumn("Genres").AsString().Nullable()
.WithColumn("Certification").AsString().Nullable()
.WithColumn("Collection").AsString().Nullable()
.WithColumn("Website").AsString().Nullable()
.WithColumn("OriginalTitle").AsString().Nullable()
.WithColumn("PhysicalRelease").AsDateTime().Nullable()
.WithColumn("Translations").AsString()
.WithColumn("Studio").AsString().Nullable()
.WithColumn("YouTubeTrailerId").AsString().Nullable()
.WithColumn("DigitalRelease").AsDateTime().Nullable();
}
}
}