LogProvider now usues petapoco

This commit is contained in:
kay.one
2011-06-17 17:11:12 -07:00
parent 335639fabc
commit f4801901a7
8 changed files with 234 additions and 157 deletions

View File

@@ -41,12 +41,12 @@ namespace NzbDrone.Core.Datastore.Migrations
{
new Column("SeriesId", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Title", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("CleanTitle", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("CleanTitle", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("Status", DbType.String, ColumnProperty.Null),
new Column("Overview", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("Overview", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("AirsDayOfWeek", DbType.Int16, ColumnProperty.Null),
new Column("AirTimes", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("Language", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("AirTimes", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("Language", DbType.String, ColumnProperty.NotNull, String.Empty),
new Column("Path", DbType.String, ColumnProperty.NotNull),
new Column("Monitored", DbType.Boolean, ColumnProperty.NotNull),
new Column("QualityProfileId", DbType.Int16, ColumnProperty.NotNull),
@@ -92,51 +92,67 @@ namespace NzbDrone.Core.Datastore.Migrations
});
Database.AddTable("History", "SQLite", new[]
{
new Column("HistoryId", DbType.Int64, ColumnProperty.PrimaryKey),
new Column("EpisodeId", DbType.Int32, ColumnProperty.NotNull),
new Column("SeriesId", DbType.Int32, ColumnProperty.NotNull),
new Column("NzbTitle", DbType.String, ColumnProperty.NotNull),
new Column("Date", DbType.DateTime, ColumnProperty.NotNull),
new Column("Quality", DbType.Int16, ColumnProperty.NotNull),
new Column("IsProper", DbType.Boolean, ColumnProperty.NotNull),
new Column("Indexer", DbType.String, ColumnProperty.NotNull)
});
{
new Column("HistoryId", DbType.Int64, ColumnProperty.PrimaryKey),
new Column("EpisodeId", DbType.Int32, ColumnProperty.NotNull),
new Column("SeriesId", DbType.Int32, ColumnProperty.NotNull),
new Column("NzbTitle", DbType.String, ColumnProperty.NotNull),
new Column("Date", DbType.DateTime, ColumnProperty.NotNull),
new Column("Quality", DbType.Int16, ColumnProperty.NotNull),
new Column("IsProper", DbType.Boolean, ColumnProperty.NotNull),
new Column("Indexer", DbType.String, ColumnProperty.NotNull)
});
Database.AddTable("RootDirs", "SQLite", new[]
{
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Path", DbType.String, ColumnProperty.NotNull)
});
{
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Path", DbType.String, ColumnProperty.NotNull)
});
Database.AddTable("ExternalNotificationSettings", "SQLite", new[]
{
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Enabled", DbType.Boolean, ColumnProperty.NotNull),
new Column("NotifierName", DbType.String, ColumnProperty.NotNull),
new Column("Name", DbType.String, ColumnProperty.NotNull)
});
{
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Enabled", DbType.Boolean, ColumnProperty.NotNull)
,
new Column("NotifierName", DbType.String,
ColumnProperty.NotNull),
new Column("Name", DbType.String, ColumnProperty.NotNull)
});
Database.AddTable("JobSettings", "SQLite", new[]
{
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Enable", DbType.Boolean, ColumnProperty.NotNull),
new Column("TypeName", DbType.String, ColumnProperty.NotNull),
new Column("Name", DbType.String, ColumnProperty.NotNull),
new Column("Interval", DbType.Int32, ColumnProperty.NotNull),
new Column("LastExecution", DbType.DateTime, ColumnProperty.NotNull),
new Column("Success", DbType.Boolean, ColumnProperty.NotNull)
});
{
new Column("Id", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Enable", DbType.Boolean, ColumnProperty.NotNull),
new Column("TypeName", DbType.String, ColumnProperty.NotNull),
new Column("Name", DbType.String, ColumnProperty.NotNull),
new Column("Interval", DbType.Int32, ColumnProperty.NotNull),
new Column("LastExecution", DbType.DateTime, ColumnProperty.NotNull),
new Column("Success", DbType.Boolean, ColumnProperty.NotNull)
});
Database.AddTable("QualityProfiles", "SQLite", new[]
{
new Column("QualityProfileId", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Name", DbType.String, ColumnProperty.NotNull),
new Column("Cutoff", DbType.Int32, ColumnProperty.NotNull),
new Column("SonicAllowed", DbType.String, ColumnProperty.NotNull),
});
{
new Column("QualityProfileId", DbType.Int32, ColumnProperty.PrimaryKey),
new Column("Name", DbType.String, ColumnProperty.NotNull),
new Column("Cutoff", DbType.Int32, ColumnProperty.NotNull),
new Column("SonicAllowed", DbType.String, ColumnProperty.NotNull),
});
Database.AddTable("Logs", "SQLite", new[]
{
new Column("LogId", DbType.Int64, ColumnProperty.PrimaryKey),
new Column("Message", DbType.String, ColumnProperty.NotNull),
new Column("Time", DbType.DateTime, ColumnProperty.NotNull),
new Column("Logger", DbType.String, ColumnProperty.NotNull),
new Column("Method", DbType.String, ColumnProperty.NotNull),
new Column("Exception", DbType.String, ColumnProperty.Null),
new Column("ExceptionType", DbType.String, ColumnProperty.Null),
new Column("Level", DbType.String, ColumnProperty.NotNull)
});
}
public override void Down()
{
throw new NotImplementedException();