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.
39 lines
2.6 KiB
39 lines
2.6 KiB
using System.Data;
|
|
using Migrator.Framework;
|
|
|
|
namespace NzbDrone.Core.Datastore.Migrations
|
|
{
|
|
[Migration(20120420)]
|
|
public class Migration20120420 : NzbDroneMigration
|
|
{
|
|
protected override void MainDbUpgrade()
|
|
{
|
|
Database.AddTable("SearchHistory", new[]
|
|
{
|
|
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKeyWithIdentity),
|
|
new Column("SeriesId", DbType.Int32, ColumnProperty.NotNull),
|
|
new Column("SeasonNumber", DbType.Int32, ColumnProperty.Null),
|
|
new Column("EpisodeId", DbType.Int32, ColumnProperty.Null),
|
|
new Column("SearchTime", DbType.DateTime, ColumnProperty.NotNull),
|
|
new Column("SuccessfulDownload", DbType.Boolean, ColumnProperty.NotNull)
|
|
});
|
|
|
|
Database.AddTable("SearchHistoryItems", new[]
|
|
{
|
|
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKeyWithIdentity),
|
|
new Column("SearchHistoryId", DbType.Int32, ColumnProperty.NotNull),
|
|
new Column("ReportTitle", DbType.String, ColumnProperty.NotNull),
|
|
new Column("Indexer", DbType.String, ColumnProperty.NotNull),
|
|
new Column("NzbUrl", DbType.String, ColumnProperty.NotNull),
|
|
new Column("NzbInfoUrl", DbType.String, ColumnProperty.Null),
|
|
new Column("Success", DbType.Boolean, ColumnProperty.NotNull),
|
|
new Column("SearchError", DbType.Int32, ColumnProperty.NotNull),
|
|
new Column("Quality", DbType.Int32, ColumnProperty.NotNull),
|
|
new Column("Proper", DbType.Boolean, ColumnProperty.NotNull),
|
|
new Column("Age", DbType.Int32, ColumnProperty.NotNull),
|
|
new Column("Language", DbType.Int32, ColumnProperty.NotNull),
|
|
new Column("Size", DbType.Int64, ColumnProperty.NotNull),
|
|
});
|
|
}
|
|
}
|
|
} |