diff --git a/projects/IoTNode/update1.0.0.530.sql b/projects/IoTNode/200827.sql
similarity index 100%
rename from projects/IoTNode/update1.0.0.530.sql
rename to projects/IoTNode/200827.sql
diff --git a/projects/IoTNode/IoTNode.csproj b/projects/IoTNode/IoTNode.csproj
index fbc6908a..67ed2f1f 100644
--- a/projects/IoTNode/IoTNode.csproj
+++ b/projects/IoTNode/IoTNode.csproj
@@ -25,7 +25,7 @@
PreserveNewest
-
+
PreserveNewest
diff --git a/projects/IoTNode/Program.cs b/projects/IoTNode/Program.cs
index 896aa3ee..155285dc 100644
--- a/projects/IoTNode/Program.cs
+++ b/projects/IoTNode/Program.cs
@@ -32,50 +32,4 @@ namespace IoTNode
.Run();
}
}
-}
-/*
-1.程序
-(1)检查升级程序是否需要升级
-(2)升级升级程序
-(3)下载升级程序,检查checksum
-(4)备份现有升级程序
-(5)关闭升级程序
-(6)升级升级程序:ui, db->start
-(7)升级失败,还原升级程序,写入失败信息到程序存储
-(8)升级成功,启动升级程序
-(9)发送升级命令给升级程序
-2.升级程序
-(1)检查程序是否需要升级
-(2)下载新程序,检查checksum
-(3)备份现有程序
-(4)升级程序
-(5)失败还原
-(6)成功启动
-*/
-/*
-///
- ///
- /// http://www.xml-rpc.net/faq/xmlrpcnetfaq-2-5-0.html#2.5
- /// http://supervisord.org/api.html
- ///
- [XmlRpcUrl("http://iot.edusoa.com:8003/RPC2")]
- public interface ISupervisor : IXmlRpcProxy
- {
- [XmlRpcMethod("system.listMethods")]
- string SystemListMethods(int stateNumber);
- }
-
- class Program
- {
- static void Main(string[] args)
- {
- var proxy = XmlRpcProxyGen.Create();
- proxy.Credentials = new NetworkCredential("usr", "pwd");
- var list = proxy.SystemListMethods();
- foreach (var item in list)
- {
- Console.WriteLine(item);
- }
- }
- }
-*/
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/projects/IoTNode/Startup.cs b/projects/IoTNode/Startup.cs
index 90653003..8d5e39ae 100644
--- a/projects/IoTNode/Startup.cs
+++ b/projects/IoTNode/Startup.cs
@@ -63,7 +63,8 @@ namespace IoTNode
app.UseHangfireDashboard("/job", options);
app.UseHangfireServer();
- UpdateDataBase(app, "update1.0.0.530.sql", () => Helper.Instance.GetVersion() == "1.0.0.530");
+ var version = Convert.ToInt64(Helper.Instance.GetVersion().Replace(".", ""));
+ UpdateDataBase(app, "10020082702.sql", () => version < 10020082702);
UpdateVersion(app);
}