mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 11:26:00 +00:00
new collection refactor + mongo drop collection fixed
This commit is contained in:
@@ -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`);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user