登录连接信息
This commit is contained in:
commit
5c51e96f67
6 files changed
+176
-59
No files matched your search
+10
-4
@@ -234,10 +234,15 @@ namespace SunlightAggregationTerminal.Class
|
||||
reader.Close(); // 记得关闭 Reader
|
||||
|
||||
// 检查并添加缺失字段 (直接拼接 SQL)
|
||||
// 检查 Enterprise
|
||||
if (!existingColumns.Contains("Enterprise"))
|
||||
if (!existingColumns.Contains("START"))
|
||||
{
|
||||
string sql = "ALTER TABLE Server ADD COLUMN Enterprise TEXT NULL;";
|
||||
string sql = "ALTER TABLE Server ADD COLUMN START BOOL DEFAULT (0);";
|
||||
SQLitedata.ExecuteNonQuery(sql, null);
|
||||
}
|
||||
// 检查 Server
|
||||
if (!existingColumns.Contains("Server"))
|
||||
{
|
||||
string sql = "ALTER TABLE Server ADD COLUMN Server TEXT NULL;";
|
||||
SQLitedata.ExecuteNonQuery(sql, null);
|
||||
}
|
||||
// 检查 ServerID
|
||||
@@ -300,7 +305,8 @@ namespace SunlightAggregationTerminal.Class
|
||||
// 建表语句
|
||||
string createSql = @"
|
||||
CREATE TABLE Server (
|
||||
Enterprise TEXT,
|
||||
START BOOL DEFAULT (0),
|
||||
Server TEXT,
|
||||
ServerID TEXT
|
||||
);";
|
||||
|
||||
|
||||
Reference in new issue
Block a user