Radarr/src/NzbDrone.Core/Datastore/Migration/147_add_custom_formats.cs

27 lines
874 B
C#
Raw Normal View History

2019-12-22 21:24:11 +00:00
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()
{
2022-11-20 18:27:45 +00:00
// 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)
{
}
}
}