User management stuff

This commit is contained in:
Jamie.Rees 2016-10-25 17:31:59 +01:00
parent 0828756171
commit b851d77364
17 changed files with 232 additions and 94 deletions

View file

@ -57,7 +57,7 @@ namespace PlexRequests.Store
}
}
public static void AddColumn(this IDbConnection connection, string tableName, string alterType, string newColumn, bool isNullable, string dataType)
public static void AddColumn(this IDbConnection connection, string tableName, string alterType, string newColumn, bool allowNulls, string dataType)
{
connection.Open();
var result = connection.Query<TableInfo>($"PRAGMA table_info({tableName});");
@ -67,7 +67,7 @@ namespace PlexRequests.Store
}
var query = $"ALTER TABLE {tableName} {alterType} {newColumn} {dataType}";
if (isNullable)
if (!allowNulls)
{
query = query + " NOT NULL";
}