User perms

This commit is contained in:
Jamie.Rees 2016-10-28 17:24:45 +01:00
commit 6d1eef9154
17 changed files with 524 additions and 104 deletions

View file

@ -57,12 +57,13 @@ namespace PlexRequests.Store
}
}
public static void AddColumn(this IDbConnection connection, string tableName, string alterType, string newColumn, bool allowNulls, string dataType)
public static void AlterTable(this IDbConnection connection, string tableName, string alterType, string newColumn, bool allowNulls, string dataType)
{
connection.Open();
var result = connection.Query<TableInfo>($"PRAGMA table_info({tableName});");
if (result.Any(x => x.name == newColumn))
{
connection.Close();
return;
}