mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 18:49:23 +00:00
1.4.3a
- New feature permban permission (@css/permban) - CustomCommand fix - Version checker - Minor changes - Updated to CounterStrikeSharp 225 - Bump version to 1.4.3a
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace CS2_SimpleAdmin;
|
||||
namespace CS2_SimpleAdmin.Database;
|
||||
|
||||
public class Migration(Database database)
|
||||
{
|
||||
private readonly Database _database = database;
|
||||
|
||||
public void ExecuteMigrations()
|
||||
{
|
||||
var migrationsDirectory = CS2_SimpleAdmin.Instance.ModuleDirectory + "/Database/Migrations";
|
||||
@@ -14,11 +12,10 @@ public class Migration(Database database)
|
||||
var files = Directory.GetFiles(migrationsDirectory, "*.sql")
|
||||
.OrderBy(f => f);
|
||||
|
||||
using var connection = _database.GetConnection();
|
||||
using var connection = database.GetConnection();
|
||||
|
||||
// Create sa_migrations table if not exists
|
||||
using var cmd = new MySqlCommand("""
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sa_migrations` (
|
||||
`id` INT PRIMARY KEY AUTO_INCREMENT,
|
||||
`version` VARCHAR(255) NOT NULL
|
||||
|
||||
Reference in New Issue
Block a user