-
Notifications
You must be signed in to change notification settings - Fork 1
Database managment
dbryla edited this page Jun 4, 2015
·
5 revisions
Few tips for preparing database for application:
Create mongodb server like described in this document.
Login to mongo by command: mongo
Type following commands in mongo console:
use local
db.createCollection("document")
For creating sample documents run following commands:
db.document.insert({name: "global", last_change: Date(), text: "<p>Lorem ipsum.</p>", priv: false})
db.document.insert({"name":"sample1", text: "<p>sampletext1</p>", priv: false})
db.document.insert({"name":"sample2", text: "<p>Sample text 2.</p>", priv: false})
db.document.insert({"name":"sample3", text: "<p>This is also sample TEXT in document sample3.</p>", priv: false})
db.document.insert({"name":"IMPORTANT_NOTE", text: "<p>ATTENTION!</p>", priv: false})