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.
Lidarr/src/NzbDrone.Core/Datastore/Migration/005_metadata_profiles.cs

25 lines
837 B

using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(5)]
public class metadata_profiles : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Create.TableForModel("MetadataProfiles")
.WithColumn("Name").AsString().Unique()
.WithColumn("PrimaryAlbumTypes").AsString()
.WithColumn("SecondaryAlbumTypes").AsString();
Alter.Table("Artists").AddColumn("MetadataProfileId").AsInt32().WithDefaultValue(1);
Delete.Column("PrimaryAlbumTypes").FromTable("Artists");
Delete.Column("SecondaryAlbumTypes").FromTable("Artists");
Alter.Table("Albums").AddColumn("SecondaryTypes").AsString().Nullable();
}
}
}