mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-03-05 23:13:35 +00:00
Fix in creating table
This commit is contained in:
@@ -54,16 +54,16 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
|||||||
connection.Open();
|
connection.Open();
|
||||||
|
|
||||||
string sql = @"CREATE TABLE IF NOT EXISTS `sa_bans` (
|
string sql = @"CREATE TABLE IF NOT EXISTS `sa_bans` (
|
||||||
`id` int(11) NOT NULL,
|
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
`player_steamid` varchar(64) NOT NULL,
|
`player_steamid` VARCHAR(64) NOT NULL,
|
||||||
`player_name` varchar(128) NOT NULL,
|
`player_name` VARCHAR(128) NOT NULL,
|
||||||
`admin_steamid` varchar(64) NOT NULL,
|
`admin_steamid` VARCHAR(64) NOT NULL,
|
||||||
`admin_name` varchar(128) NOT NULL,
|
`admin_name` VARCHAR(128) NOT NULL,
|
||||||
`duration` int(11) NOT NULL,
|
`duration` INT NOT NULL,
|
||||||
`ends` timestamp NOT NULL,
|
`ends` TIMESTAMP NOT NULL,
|
||||||
`created` timestamp NOT NULL,
|
`created` TIMESTAMP NOT NULL,
|
||||||
`status` enum('ACTIVE','UNBANNED','EXPIRED','') NOT NULL DEFAULT 'ACTIVE'
|
`status` ENUM('ACTIVE', 'UNBANNED', 'EXPIRED', '') NOT NULL DEFAULT 'ACTIVE'
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;";
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;";
|
||||||
|
|
||||||
MySqlCommand command = new MySqlCommand(sql, connection);
|
MySqlCommand command = new MySqlCommand(sql, connection);
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
|
|||||||
Reference in New Issue
Block a user