More changes for db migration
This commit is contained in:
parent
de0284e48a
commit
889dc02945
33 changed files with 740 additions and 100 deletions
11
test/fixtures/mongo-file.js
vendored
Normal file
11
test/fixtures/mongo-file.js
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
const MongoClient = require('mongodb').MongoClient;
|
||||
|
||||
MongoClient.connect(process.env.MONGO_URL, function connect(err, db) {
|
||||
const collection = db.collection('files');
|
||||
collection.createIndex({
|
||||
'owner': 1,
|
||||
'status': 1,
|
||||
'time_added': -1,
|
||||
});
|
||||
db.close();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue