mirror of https://gitee.com/bigwinds/arangodb
also add other system collection
This commit is contained in:
parent
d4cb1b5399
commit
f64bfd9240
|
@ -200,22 +200,38 @@ function main (argv) {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// create the VERSION file
|
|
||||||
addTask("create VERSION file", 1, function () {
|
|
||||||
// save "1" into VERSION file
|
|
||||||
SYS_SAVE(versionFile, "1");
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
// create the _modules collection
|
// create the _modules collection
|
||||||
addTask("setup _modules collection", 1, function () {
|
addTask("setup _modules collection", 1, function () {
|
||||||
// create a collection named "_modules"
|
// create a collection named "_modules"
|
||||||
|
if (db._modules !== undefined) {
|
||||||
var modules = db._create("_modules", { isSystem: true });
|
var modules = db._create("_modules", { isSystem: true });
|
||||||
|
|
||||||
if (modules == null) {
|
if (modules == null) {
|
||||||
console.error("creating modules collection '_modules' failed");
|
console.error("creating modules collection '_modules' failed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// create the _routing collection
|
||||||
|
addTask("setup _routing collection", 1, function () {
|
||||||
|
// create a collection named "_routing"
|
||||||
|
if (db._routing !== undefined) {
|
||||||
|
var routing = db._create("_routing", { isSystem: true });
|
||||||
|
|
||||||
|
if (routing == null) {
|
||||||
|
console.error("creating routing collection '_routing' failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// create the VERSION file
|
||||||
|
addTask("create VERSION file", 2, function () {
|
||||||
|
// save "1" into VERSION file
|
||||||
|
SYS_SAVE(versionFile, "2");
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -837,6 +837,7 @@ function reloadRouting () {
|
||||||
routing = internal.db._collection("_routing");
|
routing = internal.db._collection("_routing");
|
||||||
|
|
||||||
if (routing === null) {
|
if (routing === null) {
|
||||||
|
// TODO: remove this auto-creation. this should be done by arango-upgrade
|
||||||
routing = internal.db._create("_routing", { isSystem: true });
|
routing = internal.db._create("_routing", { isSystem: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue