diff --git a/webapp/package.json b/webapp/package.json index 27c2089a..f669c7c8 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -1,6 +1,6 @@ { "name": "webapp-next", - "version": "1.1.0", + "version": "1.2.0", "description": "", "main": "server.js", "scripts": { diff --git a/webapp/src/components/Layout.tsx b/webapp/src/components/Layout.tsx index 8a5dc23e..ab5b8cf2 100644 --- a/webapp/src/components/Layout.tsx +++ b/webapp/src/components/Layout.tsx @@ -622,7 +622,7 @@ export default withRouter(function Layout(props) {
); diff --git a/webapp/src/migrations/1.2.0.ts b/webapp/src/migrations/1.2.0.ts new file mode 100644 index 00000000..13f52d69 --- /dev/null +++ b/webapp/src/migrations/1.2.0.ts @@ -0,0 +1,34 @@ +import debug from 'debug'; +const log = debug('webapp:migration:1.2.0'); + +export default async function(db) { + log('Updating apps collection with new properties'); + await db.collection('apps').updateMany({}, { + $set: { + memory: false, + cache: false, + }, + }); + log('Updating datasource collection with new properties'); + await db.collection('apps').updateMany({}, { + $set: { + recordCount: {}, + }, + $unset: { + syncedCount: '', + embeddedCount: '', + } + }); + + log('Making all non builtin tasks require human input'); + //NOTE: we don't use libs here e.g. SubscriptionPlan.RAW because that struct could change/not be importable anymore. all has to be encapsulated + await db.collection('apps').updateMany({ + 'data.builtin': false + }, { + $set: { + requiresHumanInput: true, + retriever_type: 'raw', + retriever_config: {}, //not required for raw + }, + }); +}