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/147_add_custom_formats.cs

27 lines
874 B

using System.Data;
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(147)]
public class add_custom_formats : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
// Execute.WithConnection(RenameUrlToBaseUrl);
Create.TableForModel("CustomFormats")
.WithColumn("Name").AsString().Unique()
.WithColumn("FormatTags").AsString();
Alter.Table("Profiles").AddColumn("FormatItems").AsString().WithDefaultValue("[{format:0, allowed:true}]").AddColumn("FormatCutoff").AsInt32().WithDefaultValue(0);
Execute.WithConnection(AddCustomFormatsToProfile);
}
private void AddCustomFormatsToProfile(IDbConnection conn, IDbTransaction tran)
{
}
}
}