feat: add user-defined schema and migrations (#7418)
This commit is contained in:
committed by
GitHub
parent
653d25731f
commit
25d5c30be2
@@ -362,6 +362,11 @@ export class MongoStorageAdapter implements StorageAdapter {
|
||||
.catch(err => this.handleError(err));
|
||||
}
|
||||
|
||||
async updateFieldOptions(className: string, fieldName: string, type: any) {
|
||||
const schemaCollection = await this._schemaCollection();
|
||||
await schemaCollection.updateFieldOptions(className, fieldName, type);
|
||||
}
|
||||
|
||||
addFieldIfNotExists(className: string, fieldName: string, type: any): Promise<void> {
|
||||
return this._schemaCollection()
|
||||
.then(schemaCollection => schemaCollection.addFieldIfNotExists(className, fieldName, type))
|
||||
|
||||
Reference in New Issue
Block a user