Added page_id field to Articles

This commit is contained in:
Florian Sylvain
2022-12-30 02:02:38 +01:00
parent c950e2cde1
commit 948243525e
3 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -4,7 +4,7 @@ const db = conn.getDB("gohcms")
db.createCollection('articles', {
validator: {
$jsonSchema: {
required: ['content', 'date', 'id_name'],
required: ['content', 'date', 'id_name', 'page_id'],
properties: {
_id: {
bsonType: 'objectId'
@@ -18,6 +18,9 @@ db.createCollection('articles', {
id_name: {
bsonType: 'string',
pattern: '^.+$'
},
page_id: {
bsonType: 'string'
}
}
}