mirror of https://gitee.com/bigwinds/arangodb
14 lines
452 B
Cheetah
14 lines
452 B
Cheetah
'use strict';
|
|
var db = require("@arangodb").db;
|
|
|
|
function createCollection(name) {
|
|
var collectionName = applicationContext.collectionName(name);
|
|
if (db._collection(collectionName) === null) {
|
|
db._create(collectionName);
|
|
} else if (applicationContext.isProduction) {
|
|
console.warn("collection '%s' already exists. Leaving it untouched.", collectionName);
|
|
}
|
|
}
|
|
<% _.each(collections, function(c) { %>
|
|
createCollection("<%= c %>");<% }); %>
|