new collection refactor + mongo drop collection fixed

This commit is contained in:
Jan Prochazka
2024-08-22 10:41:29 +02:00
parent 77b42e6a04
commit 7ad8edcdae
6 changed files with 21 additions and 5 deletions

View File

@@ -110,8 +110,10 @@ const driver = {
switch (type) {
case 'createCollection':
await this.script(pool, `db.createCollection('${operation.collection.name}')`);
case 'dropOperation':
break;
case 'dropCollection':
await this.script(pool, `db.dropCollection('${operation.collection}')`);
break;
default:
throw new Error(`Operation type ${type} not supported`);
}

View File

@@ -67,6 +67,15 @@ const driver = {
},
],
newCollectionFormParams: [
{
type: 'text',
label: 'Collection name',
name: 'name',
focused: true,
},
],
getCollectionUpdateScript(changeSet, collectionInfo) {
let res = '';
for (const insert of changeSet.inserts) {