From 36f9e1cd70ab626bed33318e4ee5fee60fb3f86d Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 2 Oct 2019 12:54:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20MongoDB=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=BB=BA=E5=BA=93=E7=9B=B8=E5=85=B3=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BootstrapAdmin.sln | 1 + db/MongoDB/install.cmd | 5 +++++ src/admin/Bootstrap.DataAccess.MongoDB/AutoDB.cs | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/MongoDB/install.cmd diff --git a/BootstrapAdmin.sln b/BootstrapAdmin.sln index 11a708d1..3e928488 100644 --- a/BootstrapAdmin.sln +++ b/BootstrapAdmin.sln @@ -33,6 +33,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MongoDB", "MongoDB", "{A06A db\MongoDB\Dicts.js = db\MongoDB\Dicts.js db\MongoDB\Groups.js = db\MongoDB\Groups.js db\MongoDB\init.js = db\MongoDB\init.js + db\MongoDB\install.cmd = db\MongoDB\install.cmd db\MongoDB\install.sh = db\MongoDB\install.sh db\MongoDB\Navigations.js = db\MongoDB\Navigations.js db\MongoDB\Roles.js = db\MongoDB\Roles.js diff --git a/db/MongoDB/install.cmd b/db/MongoDB/install.cmd new file mode 100644 index 00000000..e5f8ef0b --- /dev/null +++ b/db/MongoDB/install.cmd @@ -0,0 +1,5 @@ +# init mongodb data +@echo off + +mongo ./init.js +mongo BootstrapAdmin --eval "printjson(db.getCollectionNames())" diff --git a/src/admin/Bootstrap.DataAccess.MongoDB/AutoDB.cs b/src/admin/Bootstrap.DataAccess.MongoDB/AutoDB.cs index 56a30681..8a7f79f8 100644 --- a/src/admin/Bootstrap.DataAccess.MongoDB/AutoDB.cs +++ b/src/admin/Bootstrap.DataAccess.MongoDB/AutoDB.cs @@ -11,7 +11,7 @@ /// public override void CheckDB(string folder) { - + // 没有环境暂时未写代码 } } }