parent
917ae0f999
commit
98faca17ee
@ -0,0 +1,11 @@
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NzbDrone.Common.Contract
|
||||
{
|
||||
public class ExceptionReportResponse
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public int ExceptionId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Migrator.Framework;
|
||||
|
||||
namespace NzbDrone.Services.Service.Migrations
|
||||
{
|
||||
[Migration(20120229)]
|
||||
public class Migration20120229 : Migration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
|
||||
Database.AddTable("ExceptionInstances", new Column("Id", DbType.Int64, ColumnProperty.PrimaryKeyWithIdentity),
|
||||
new Column("ExceptionDetail", DbType.Int16, ColumnProperty.NotNull),
|
||||
new Column("LogMessage", DbType.String, 3000, ColumnProperty.NotNull),
|
||||
MigrationsHelper.TimestampColumn,
|
||||
MigrationsHelper.ProductionColumn);
|
||||
|
||||
Database.AddTable("Exceptions", new Column("Id", DbType.Int64, ColumnProperty.PrimaryKeyWithIdentity),
|
||||
new Column("Logger", DbType.String, ColumnProperty.NotNull),
|
||||
new Column("Type", DbType.String, ColumnProperty.NotNull),
|
||||
new Column("String", DbType.String, ColumnProperty.NotNull),
|
||||
new Column("Hash", DbType.String, ColumnProperty.NotNull),
|
||||
MigrationsHelper.VersionColumn);
|
||||
|
||||
|
||||
Database.ExecuteNonQuery("ALTER TABLE ExceptionReports ALTER COLUMN String NTEXT");
|
||||
Database.ExecuteNonQuery("ALTER TABLE Exceptions ALTER COLUMN String NTEXT");
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Services.PetaPoco;
|
||||
|
||||
namespace NzbDrone.Services.Service.Repository.Reporting
|
||||
{
|
||||
[TableName("Exceptions")]
|
||||
public class ExceptionDetail
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Logger { get; set; }
|
||||
public string Type { get; set; }
|
||||
public string String { get; set; }
|
||||
public string Hash { get; set; }
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Services.PetaPoco;
|
||||
|
||||
namespace NzbDrone.Services.Service.Repository.Reporting
|
||||
{
|
||||
[TableName("ExceptionInstances")]
|
||||
public class ExceptionInstance
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public int ExceptionDetail { get; set; }
|
||||
public string LogMessage { get; set; }
|
||||
public DateTime Timestamp { get; set; }
|
||||
public bool IsProduction { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in new issue