@tiledesk/tiledesk-server 2.11.7 → 2.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,9 @@
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
7
7
|
|
8
|
+
# 2.11.8
|
9
|
+
- Added: migration file to migrate namespace engine
|
10
|
+
|
8
11
|
# 2.11.7
|
9
12
|
- Hotfix: solved bug on findProjectUsersAllAndAvailableWithOperatingHours_group on searching group
|
10
13
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var winston = require('../config/winston');
|
2
|
+
const { Namespace } = require('../models/kb_setting');
|
3
|
+
|
4
|
+
async function up () {
|
5
|
+
|
6
|
+
if (!process.env.PINECONE_INDEX || !process.env.PINECONE_TYPE) {
|
7
|
+
winston.error("Namespace engine migration STOPPED. PINECONE_TYPE or PINECONE_INDEX undefined.");
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
|
11
|
+
let engine = {
|
12
|
+
name: "pinecone",
|
13
|
+
type: process.env.PINECONE_TYPE,
|
14
|
+
apikey: "",
|
15
|
+
vector_size: 1536,
|
16
|
+
index_name: process.env.PINECONE_INDEX
|
17
|
+
};
|
18
|
+
|
19
|
+
try {
|
20
|
+
const updates = await Namespace.updateMany(
|
21
|
+
{ engine: { $exists: false } },
|
22
|
+
{ engine: engine }
|
23
|
+
);
|
24
|
+
winston.info("Schema updated for " + updates.nModified + " namespace");
|
25
|
+
} catch (err) {
|
26
|
+
winston.error("Error updating namespaces in migration:", err);
|
27
|
+
throw err;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
module.exports = { up };
|