Skip to content

Commit

Permalink
Fix bug: Create DB table
Browse files Browse the repository at this point in the history
  • Loading branch information
尧杰 曾 committed Aug 5, 2022
1 parent 79a2856 commit e1f5dd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions PermissionSync/Database/DBManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public DBManager()

internal void CheckSchama()
{
DBConnection.ExecuteQuery(true,
$"CREATE TABLE IF NOT EXISTS `{Main.Instance.Configuration.Instance.DatabaseTableName}` (`SteamID` BIGINT NOT NULL, `PermissionGroup` varchar(32) NOT NULL, `ExpireDate` datetime(6) NOT NULL DEFAULT '{DateTime.MaxValue}', `Operator` VARCHAR(32) NOT NULL , UNIQUE KEY unique_permission (SteamID,PermissionGroup)");

if(Main.Instance.Configuration.Instance.TableVer == 1)
DBConnection.ExecuteQuery(true,
$"CREATE TABLE IF NOT EXISTS `{Main.Instance.Configuration.Instance.DatabaseTableName}` (`SteamID` BIGINT NOT NULL, `PermissionGroup` varchar(32) NOT NULL, `ExpireDate` datetime(6) NOT NULL DEFAULT '{DateTime.MaxValue}', `Operator` VARCHAR(32) NOT NULL,UNIQUE KEY unique_permission (`SteamID`,`PermissionGroup`));");
if (Main.Instance.Configuration.Instance.TableVer == 1)
{
DBConnection.ExecuteQuery(true,
$"ALTER TABLE `{Main.Instance.Configuration.Instance.DatabaseTableName}` ADD CONSTRAINT unique_permission UNIQUE KEY(`SteamID`,`PermissionGroup`)");
Expand Down
4 changes: 2 additions & 2 deletions PermissionSync/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.2")]
[assembly: AssemblyFileVersion("1.0.1.2")]
[assembly: AssemblyVersion("1.0.1.3")]
[assembly: AssemblyFileVersion("1.0.1.3")]

0 comments on commit e1f5dd6

Please sign in to comment.