To migrate the DB to be compatible with parse, some research has to be done.
Object ids
Parse-server uses/requires type string for primary keys (attribute _id) in collections but our mongo db collections are using type ObjectId. ObjectIds can be auto created, string ids not.
What exact id format to use? Parse server, mongoose or mongoDB format?
Is there a possibility to auto generate string ids via mongoose, mongoDB driver or parse server?
Are migrated ids compatible with parse-server and mongoose?
Does the parse server or mongoDB check for uniqueness of keys?
"created" and "updated" fields
createdAt and updatedAt fields should be renamed to _created_at and _updated_at because the parse-server uses these fields.
Is the current date format compatible with parse server?
Revision keys
Avoid/Rename field names starting with '_' except the ones mentioned above. Currently only '__v' is used (auto created by mongoose as revision counter).
To migrate the DB to be compatible with parse, some research has to be done.
Object ids
Parse-server uses/requires type string for primary keys (attribute _id) in collections but our mongo db collections are using type ObjectId. ObjectIds can be auto created, string ids not.
Read: ObjectId in MongoDB
"created" and "updated" fields
createdAt and updatedAt fields should be renamed to _created_at and _updated_at because the parse-server uses these fields.
Revision keys
Avoid/Rename field names starting with '
_
' except the ones mentioned above. Currently only '__v
' is used (auto created by mongoose as revision counter).Read: versionKey in mongoose
Indexing