mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
User management, migration and newsletter
This commit is contained in:
parent
11ecbf04f6
commit
42c437905e
26 changed files with 888 additions and 389 deletions
|
@ -39,14 +39,14 @@ namespace PlexRequests.Store
|
|||
/// Creates the tables located in the SqlTables.sql file.
|
||||
/// </summary>
|
||||
/// <param name="connection">The connection.</param>
|
||||
public static void CreateTables(IDbConnection connection)
|
||||
public static void CreateTables(this IDbConnection connection)
|
||||
{
|
||||
connection.Open();
|
||||
connection.Execute(Sql.SqlTables);
|
||||
connection.Close();
|
||||
}
|
||||
|
||||
public static void DropTable(IDbConnection con, string tableName)
|
||||
public static void DropTable(this IDbConnection con, string tableName)
|
||||
{
|
||||
using (con)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ namespace PlexRequests.Store
|
|||
}
|
||||
}
|
||||
|
||||
public static void AddColumn(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 isNullable, string dataType)
|
||||
{
|
||||
connection.Open();
|
||||
var result = connection.Query<TableInfo>($"PRAGMA table_info({tableName});");
|
||||
|
@ -77,7 +77,7 @@ namespace PlexRequests.Store
|
|||
connection.Close();
|
||||
}
|
||||
|
||||
public static void Vacuum(IDbConnection con)
|
||||
public static void Vacuum(this IDbConnection con)
|
||||
{
|
||||
using (con)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue