mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
Cleaned, refactored, added db init script
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
conn = new Mongo()
|
||||
db = conn.getDB("gohcms")
|
||||
|
||||
db.createCollection('articles', {
|
||||
validator: {
|
||||
$jsonSchema: {
|
||||
required: ['content', 'date', 'id_name'],
|
||||
properties: {
|
||||
_id: {
|
||||
bsonType: 'objectId'
|
||||
},
|
||||
content: {
|
||||
bsonType: 'object'
|
||||
},
|
||||
date: {
|
||||
bsonType: 'number'
|
||||
},
|
||||
id_name: {
|
||||
bsonType: 'string',
|
||||
pattern: '^.+$'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user