@onereach/idw-init-account-resources 0.19.3 → 0.19.4
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/assets/db_migrations/20240000000000-add-ts-js-migrations.js.map +1 -1
- package/dist/assets/db_migrations/20240527090840-create_feed_table.js.map +1 -1
- package/dist/assets/db_migrations/20240527090856-add_user_columns.js.map +1 -1
- package/dist/assets/db_migrations/20240621120938-add-knowledge-skill.js.map +1 -1
- package/dist/assets/db_migrations/20240723101405-add-author-to-feed.js.map +1 -1
- package/dist/assets/db_migrations/20240723101405-add-label-to-feed.js.map +1 -1
- package/dist/assets/db_migrations/20240819183250-create_reporting_tables.js.map +1 -1
- package/dist/assets/db_migrations/20240828121206-add_user_question_table.js.map +1 -1
- package/dist/assets/db_migrations/20240926094736-add_autogenerated_id_to_reporting_tables.js.map +1 -1
- package/dist/assets/db_migrations/20241018163528-create_feed_comments_table.js.map +1 -1
- package/dist/assets/db_migrations/20241031103134-feed_comments_cascade_delete.js.map +1 -1
- package/dist/assets/db_migrations/20241106115317-add-skill-id-to-feed.js.map +1 -1
- package/dist/assets/db_migrations/20241108215450-create_model_datasource_tables.js.map +1 -1
- package/dist/assets/db_migrations/20241217131049-knowledge_auto_id.js.map +1 -1
- package/dist/assets/db_migrations/20241217131552-knowledge_add_domain_and_expiration_columns.js.map +1 -1
- package/dist/assets/db_migrations/20241217132005-knowledge_auto_update_dates.js.map +1 -1
- package/dist/assets/db_migrations/20241224163528-create_feed_reactions.js.map +1 -1
- package/dist/assets/db_migrations/20250103134909-create-idw-graph.js.map +1 -1
- package/dist/assets/db_migrations/20250109103921-fix-broken-updated-at-function.js.map +1 -1
- package/dist/assets/db_migrations/20250113094030-knowledge_statuses.js.map +1 -1
- package/dist/assets/db_migrations/20250113094602-drop_knowledge_categories.js.map +1 -1
- package/dist/assets/db_migrations/20250113132203-create_feed_read.js.map +1 -1
- package/dist/assets/db_migrations/20250115172228-knowledge_domains.js.map +1 -1
- package/dist/assets/db_migrations/20250122131849-feed_post_video.js.map +1 -1
- package/dist/assets/db_migrations/20250214132209-create_feedback_table.js.map +1 -1
- package/dist/assets/db_migrations/20250311105958-delete-knowledge-approved-status.js.map +1 -1
- package/dist/assets/db_migrations/20250401092323-datasource-search-order.js +1 -1
- package/dist/assets/db_migrations/20250401092323-datasource-search-order.js.map +1 -1
- package/dist/assets/db_migrations/20250402100448-add-file-url-to-knowledge.js.map +1 -1
- package/dist/assets/db_migrations/20250423100508-leave-feedback-drop-user-not-null.js.map +1 -1
- package/dist/assets/db_migrations/20250520103623-datasources-access.js.map +1 -1
- package/dist/assets/db_migrations/20250618135125-datasources-is-llm.js.map +1 -1
- package/dist/assets/db_migrations/20250623160622-add_skill_info_to_feedback_table.js.map +1 -1
- package/dist/assets/db_migrations/20250624113914-move-info-from-orbes-to-rdb.js.map +1 -1
- package/dist/assets/db_migrations/20250801134909-create-MCP-graphs.js.map +1 -1
- package/dist/assets/db_migrations/20250818113914-add-mcp-url.js.map +1 -1
- package/dist/assets/db_migrations/20250919081632-add-enable-property-for-datasources.js.map +1 -1
- package/dist/assets/db_migrations/20250922090051-chat-sessions.js +1 -1
- package/dist/assets/db_migrations/20250922090051-chat-sessions.js.map +1 -1
- package/dist/assets/db_migrations/20251110102751-move-account-settings-to-kv-settings.js.map +1 -1
- package/dist/assets/db_migrations/20251117171755-sync-graph.js.map +1 -1
- package/dist/assets/db_migrations/20251124123410-create-collect-information-skill-tables.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/db_migrations/20240000000000-add-ts-js-migrations.ts +5 -2
- package/src/assets/db_migrations/20240527090840-create_feed_table.ts +6 -3
- package/src/assets/db_migrations/20240527090856-add_user_columns.ts +6 -3
- package/src/assets/db_migrations/20240621120938-add-knowledge-skill.ts +6 -3
- package/src/assets/db_migrations/20240723101405-add-author-to-feed.ts +6 -3
- package/src/assets/db_migrations/20240723101405-add-label-to-feed.ts +6 -3
- package/src/assets/db_migrations/20240819183250-create_reporting_tables.ts +6 -3
- package/src/assets/db_migrations/20240828121206-add_user_question_table.ts +6 -3
- package/src/assets/db_migrations/20240926094736-add_autogenerated_id_to_reporting_tables.ts +6 -3
- package/src/assets/db_migrations/20241018163528-create_feed_comments_table.ts +6 -3
- package/src/assets/db_migrations/20241031103134-feed_comments_cascade_delete.ts +6 -3
- package/src/assets/db_migrations/20241106115317-add-skill-id-to-feed.ts +6 -3
- package/src/assets/db_migrations/20241108215450-create_model_datasource_tables.ts +6 -3
- package/src/assets/db_migrations/20241217131049-knowledge_auto_id.ts +6 -3
- package/src/assets/db_migrations/20241217131552-knowledge_add_domain_and_expiration_columns.ts +6 -3
- package/src/assets/db_migrations/20241217132005-knowledge_auto_update_dates.ts +6 -3
- package/src/assets/db_migrations/20241224163528-create_feed_reactions.ts +6 -3
- package/src/assets/db_migrations/20250103134909-create-idw-graph.ts +5 -2
- package/src/assets/db_migrations/20250109103921-fix-broken-updated-at-function.ts +6 -3
- package/src/assets/db_migrations/20250113094030-knowledge_statuses.ts +6 -3
- package/src/assets/db_migrations/20250113094602-drop_knowledge_categories.ts +6 -3
- package/src/assets/db_migrations/20250113132203-create_feed_read.ts +6 -3
- package/src/assets/db_migrations/20250115172228-knowledge_domains.ts +6 -3
- package/src/assets/db_migrations/20250122131849-feed_post_video.ts +6 -3
- package/src/assets/db_migrations/20250214132209-create_feedback_table.ts +6 -3
- package/src/assets/db_migrations/20250311105958-delete-knowledge-approved-status.ts +6 -3
- package/src/assets/db_migrations/20250401092323-datasource-search-order.ts +9 -6
- package/src/assets/db_migrations/20250402100448-add-file-url-to-knowledge.ts +6 -3
- package/src/assets/db_migrations/20250423100508-leave-feedback-drop-user-not-null.ts +5 -2
- package/src/assets/db_migrations/20250520103623-datasources-access.ts +6 -3
- package/src/assets/db_migrations/20250618135125-datasources-is-llm.ts +6 -3
- package/src/assets/db_migrations/20250623160622-add_skill_info_to_feedback_table.ts +6 -3
- package/src/assets/db_migrations/20250624113914-move-info-from-orbes-to-rdb.ts +5 -2
- package/src/assets/db_migrations/20250801134909-create-MCP-graphs.ts +5 -2
- package/src/assets/db_migrations/20250818113914-add-mcp-url.ts +5 -2
- package/src/assets/db_migrations/20250919081632-add-enable-property-for-datasources.ts +6 -3
- package/src/assets/db_migrations/20250922090051-chat-sessions.ts +8 -4
- package/src/assets/db_migrations/20251110102751-move-account-settings-to-kv-settings.ts +5 -2
- package/src/assets/db_migrations/20251117171755-sync-graph.ts +5 -2
- package/src/assets/db_migrations/20251124123410-create-collect-information-skill-tables.ts +6 -3
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
9
12
|
|
|
@@ -34,7 +37,7 @@ module.exports = {
|
|
|
34
37
|
COMMENT ON COLUMN feed_comments.created_by IS 'id of the person who created the comment';`);
|
|
35
38
|
},
|
|
36
39
|
|
|
37
|
-
async down(queryInterface: QueryInterface &
|
|
40
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
38
41
|
await queryInterface.context.sequelize.query(`
|
|
39
42
|
DROP TABLE IF EXISTS "feed_comments"
|
|
40
43
|
`);
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
ALTER TABLE feed_comments
|
|
9
12
|
DROP CONSTRAINT feed_comments_feed_id_fkey,
|
|
@@ -15,7 +18,7 @@ module.exports = {
|
|
|
15
18
|
`);
|
|
16
19
|
},
|
|
17
20
|
|
|
18
|
-
async down(queryInterface: QueryInterface &
|
|
21
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
19
22
|
await queryInterface.context.sequelize.query(`
|
|
20
23
|
ALTER TABLE feed_comments
|
|
21
24
|
DROP CONSTRAINT feed_comments_feed_id_fkey,
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
ALTER TABLE "feed"
|
|
9
12
|
ADD COLUMN IF NOT EXISTS "skill_id" varchar;
|
|
10
13
|
`);
|
|
11
14
|
},
|
|
12
15
|
|
|
13
|
-
async down(queryInterface: QueryInterface &
|
|
16
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
14
17
|
await queryInterface.context.sequelize.query(`
|
|
15
18
|
ALTER TABLE "feed"
|
|
16
19
|
DROP COLUMN "skill_id";
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
10
13
|
|
|
@@ -73,7 +76,7 @@ module.exports = {
|
|
|
73
76
|
`);
|
|
74
77
|
},
|
|
75
78
|
|
|
76
|
-
async down(queryInterface: QueryInterface &
|
|
79
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
77
80
|
// Drop triggers and function
|
|
78
81
|
await queryInterface.context.sequelize.query(`
|
|
79
82
|
DROP TRIGGER IF EXISTS set_updated_at_models ON models;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
10
13
|
ALTER TABLE knowledge
|
|
@@ -12,7 +15,7 @@ module.exports = {
|
|
|
12
15
|
`);
|
|
13
16
|
},
|
|
14
17
|
|
|
15
|
-
async down(queryInterface: QueryInterface &
|
|
18
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
16
19
|
await queryInterface.context.sequelize.query(`
|
|
17
20
|
ALTER TABLE knowledge
|
|
18
21
|
ALTER COLUMN knowledge_id DROP DEFAULT;
|
package/src/assets/db_migrations/20241217131552-knowledge_add_domain_and_expiration_columns.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
const sequelize = queryInterface.context.sequelize;
|
|
9
12
|
|
|
10
13
|
const [results] = await sequelize.query(`
|
|
@@ -31,7 +34,7 @@ module.exports = {
|
|
|
31
34
|
`);
|
|
32
35
|
},
|
|
33
36
|
|
|
34
|
-
async down(queryInterface: QueryInterface &
|
|
37
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
35
38
|
await queryInterface.context.sequelize.query(`
|
|
36
39
|
ALTER TABLE knowledge
|
|
37
40
|
DROP COLUMN IF EXISTS domain,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
CREATE OR REPLACE FUNCTION update_updated_at()
|
|
10
13
|
RETURNS TRIGGER AS $$
|
|
@@ -25,7 +28,7 @@ module.exports = {
|
|
|
25
28
|
`);
|
|
26
29
|
},
|
|
27
30
|
|
|
28
|
-
async down(queryInterface: QueryInterface &
|
|
31
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
29
32
|
await queryInterface.context.sequelize.query(`
|
|
30
33
|
DROP FUNCTION IF EXISTS update_updated_at();
|
|
31
34
|
ALTER TABLE knowledge
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
-- Table Definition
|
|
9
12
|
CREATE TABLE IF NOT EXISTS feed_reactions (
|
|
@@ -20,7 +23,7 @@ module.exports = {
|
|
|
20
23
|
`);
|
|
21
24
|
},
|
|
22
25
|
|
|
23
|
-
async down(queryInterface: QueryInterface &
|
|
26
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
24
27
|
await queryInterface.context.sequelize.query(`
|
|
25
28
|
DROP TABLE IF EXISTS "feed_reactions"
|
|
26
29
|
`);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { Graph, Graphs } from '@or-sdk/graph';
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
type DiscovyreService = {
|
|
5
8
|
serviceKey: string;
|
|
6
9
|
url: string;
|
|
@@ -8,7 +11,7 @@ type DiscovyreService = {
|
|
|
8
11
|
|
|
9
12
|
/** @type {import('sequelize-cli').Migration} */
|
|
10
13
|
module.exports = {
|
|
11
|
-
async up(queryInterface: QueryInterface &
|
|
14
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
12
15
|
const { discoveryUrl, _orToken } = queryInterface.context;
|
|
13
16
|
|
|
14
17
|
try {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
CREATE OR REPLACE FUNCTION update_updated_at()
|
|
10
13
|
RETURNS TRIGGER AS $$
|
|
@@ -31,7 +34,7 @@ module.exports = {
|
|
|
31
34
|
`);
|
|
32
35
|
},
|
|
33
36
|
|
|
34
|
-
async down(queryInterface: QueryInterface &
|
|
37
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
35
38
|
await queryInterface.context.sequelize.query(`
|
|
36
39
|
DROP FUNCTION IF EXISTS update_updated_at();
|
|
37
40
|
DROP FUNCTION IF EXISTS update_date_modified();
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
UPDATE knowledge
|
|
10
13
|
SET status = 'published'
|
|
@@ -18,7 +21,7 @@ module.exports = {
|
|
|
18
21
|
`);
|
|
19
22
|
},
|
|
20
23
|
|
|
21
|
-
async down(queryInterface: QueryInterface &
|
|
24
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
22
25
|
await queryInterface.context.sequelize.query(`
|
|
23
26
|
UPDATE knowledge
|
|
24
27
|
SET status = 'Trained'
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
ALTER TABLE knowledge
|
|
10
13
|
DROP COLUMN selected_categories
|
|
11
14
|
`);
|
|
12
15
|
},
|
|
13
16
|
|
|
14
|
-
async down(queryInterface: QueryInterface &
|
|
17
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
15
18
|
await queryInterface.context.sequelize.query(`
|
|
16
19
|
ALTER TABLE knowledge
|
|
17
20
|
ADD COLUMN IF NOT EXISTS selected_categories jsonb;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
CREATE TABLE IF NOT EXISTS feed_read_history (
|
|
9
12
|
user_id uuid,
|
|
@@ -14,7 +17,7 @@ module.exports = {
|
|
|
14
17
|
`);
|
|
15
18
|
},
|
|
16
19
|
|
|
17
|
-
async down(queryInterface: QueryInterface &
|
|
20
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
18
21
|
await queryInterface.context.sequelize.query(`
|
|
19
22
|
DROP TABLE IF EXISTS feed_read_history
|
|
20
23
|
`);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
// Drop constraint to remove a table
|
|
9
12
|
await queryInterface.context.sequelize.query(`
|
|
10
13
|
ALTER TABLE knowledge
|
|
@@ -32,7 +35,7 @@ module.exports = {
|
|
|
32
35
|
`);
|
|
33
36
|
},
|
|
34
37
|
|
|
35
|
-
async down(queryInterface: QueryInterface &
|
|
38
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
36
39
|
await queryInterface.context.sequelize.query(`
|
|
37
40
|
-- TODO: Implement undo script
|
|
38
41
|
`);
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
ALTER TABLE "feed"
|
|
9
12
|
ADD COLUMN IF NOT EXISTS "video_source" varchar,
|
|
@@ -11,7 +14,7 @@ module.exports = {
|
|
|
11
14
|
`);
|
|
12
15
|
},
|
|
13
16
|
|
|
14
|
-
async down(queryInterface: QueryInterface &
|
|
17
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
15
18
|
await queryInterface.context.sequelize.query(`
|
|
16
19
|
ALTER TABLE "feed"
|
|
17
20
|
DROP COLUMN "video_source",
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
CREATE TABLE IF NOT EXISTS feedback (
|
|
9
12
|
id uuid default gen_random_uuid(),
|
|
@@ -18,7 +21,7 @@ module.exports = {
|
|
|
18
21
|
`);
|
|
19
22
|
},
|
|
20
23
|
|
|
21
|
-
async down(queryInterface: QueryInterface &
|
|
24
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
22
25
|
await queryInterface.context.sequelize.query(`
|
|
23
26
|
DROP TABLE IF EXISTS feedback
|
|
24
27
|
`);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
UPDATE knowledge
|
|
10
13
|
SET status = 'new'
|
|
@@ -12,7 +15,7 @@ module.exports = {
|
|
|
12
15
|
`);
|
|
13
16
|
},
|
|
14
17
|
|
|
15
|
-
async down(queryInterface: QueryInterface &
|
|
18
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
16
19
|
await queryInterface.context.sequelize.query(`
|
|
17
20
|
-- TODO: There is unreal to implement down migration
|
|
18
21
|
`);
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
ALTER TABLE models
|
|
10
13
|
DROP COLUMN IF EXISTS search_order,
|
|
@@ -15,9 +18,9 @@ module.exports = {
|
|
|
15
18
|
`);
|
|
16
19
|
},
|
|
17
20
|
|
|
18
|
-
async down(queryInterface: QueryInterface &
|
|
19
|
-
await queryInterface.context.sequelize.query(
|
|
20
|
-
|
|
21
|
-
);
|
|
21
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
22
|
+
await queryInterface.context.sequelize.query(`
|
|
23
|
+
ALTER TABLE datasources DROP COLUMN IF EXISTS search_order;
|
|
24
|
+
`);
|
|
22
25
|
},
|
|
23
26
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
const tableName = 'knowledge';
|
|
8
11
|
const docType = 'doc';
|
|
9
12
|
const textType = 'text';
|
|
@@ -36,7 +39,7 @@ module.exports = {
|
|
|
36
39
|
`);
|
|
37
40
|
},
|
|
38
41
|
|
|
39
|
-
async down(queryInterface: QueryInterface &
|
|
42
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
40
43
|
await queryInterface.context.sequelize.query(`
|
|
41
44
|
ALTER TABLE "knowledge"
|
|
42
45
|
DROP COLUMN IF EXISTS "file_url",
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
ALTER TABLE feedback
|
|
9
12
|
ALTER COLUMN user_id DROP NOT NULL;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
ALTER TABLE models
|
|
10
13
|
ADD COLUMN IF NOT EXISTS for_user_emails JSONB;
|
|
@@ -15,7 +18,7 @@ module.exports = {
|
|
|
15
18
|
`);
|
|
16
19
|
},
|
|
17
20
|
|
|
18
|
-
async down(queryInterface: QueryInterface &
|
|
21
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
19
22
|
await queryInterface.context.sequelize.query(`
|
|
20
23
|
ALTER TABLE models
|
|
21
24
|
DROP COLUMN IF EXISTS for_user_emails;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
ALTER TABLE datasources
|
|
10
13
|
ADD COLUMN IF NOT EXISTS is_llm BOOLEAN;
|
|
11
14
|
`);
|
|
12
15
|
},
|
|
13
16
|
|
|
14
|
-
async down(queryInterface: QueryInterface &
|
|
17
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
15
18
|
await queryInterface.context.sequelize.query(`
|
|
16
19
|
ALTER TABLE datasources
|
|
17
20
|
DROP COLUMN IF EXISTS is_llm;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
/** @type {import('sequelize-cli').Migration} */
|
|
5
8
|
module.exports = {
|
|
6
|
-
async up(queryInterface: QueryInterface &
|
|
9
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
7
10
|
await queryInterface.context.sequelize.query(`
|
|
8
11
|
ALTER TABLE feedback
|
|
9
12
|
ADD COLUMN IF NOT EXISTS skill_rate text,
|
|
@@ -12,7 +15,7 @@ module.exports = {
|
|
|
12
15
|
`);
|
|
13
16
|
},
|
|
14
17
|
|
|
15
|
-
async down(queryInterface: QueryInterface &
|
|
18
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
16
19
|
await queryInterface.context.sequelize.query(`
|
|
17
20
|
ALTER TABLE feedback
|
|
18
21
|
DROP COLUMN IF EXISTS skill_rate,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
type DiscovyreService = {
|
|
5
8
|
serviceKey: string;
|
|
@@ -8,7 +11,7 @@ type DiscovyreService = {
|
|
|
8
11
|
|
|
9
12
|
/** @type {import('sequelize-cli').Migration} */
|
|
10
13
|
module.exports = {
|
|
11
|
-
async up(queryInterface: QueryInterface &
|
|
14
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
12
15
|
const { discoveryUrl, _orToken } = queryInterface.context;
|
|
13
16
|
|
|
14
17
|
try {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { Graph, Graphs } from '@or-sdk/graph';
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
type DiscovyreService = {
|
|
5
8
|
serviceKey: string;
|
|
6
9
|
url: string;
|
|
@@ -8,7 +11,7 @@ type DiscovyreService = {
|
|
|
8
11
|
|
|
9
12
|
/** @type {import('sequelize-cli').Migration} */
|
|
10
13
|
module.exports = {
|
|
11
|
-
async up(queryInterface: QueryInterface &
|
|
14
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
12
15
|
const { discoveryUrl, _orToken } = queryInterface.context;
|
|
13
16
|
|
|
14
17
|
try {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import { QueryInterface
|
|
2
|
+
import { QueryInterface } from 'sequelize';
|
|
3
|
+
import { MigrationParams } from 'umzug';
|
|
4
|
+
|
|
5
|
+
import { OrMigrationContext } from '../../types';
|
|
3
6
|
|
|
4
7
|
type DiscovyreService = {
|
|
5
8
|
serviceKey: string;
|
|
@@ -8,7 +11,7 @@ type DiscovyreService = {
|
|
|
8
11
|
|
|
9
12
|
/** @type {import('sequelize-cli').Migration} */
|
|
10
13
|
module.exports = {
|
|
11
|
-
async up(queryInterface: QueryInterface &
|
|
14
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
12
15
|
const { discoveryUrl, _orToken, sequelize } = queryInterface.context;
|
|
13
16
|
|
|
14
17
|
try {
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import { QueryInterface
|
|
3
|
+
import { QueryInterface } from 'sequelize';
|
|
4
|
+
import { MigrationParams } from 'umzug';
|
|
5
|
+
|
|
6
|
+
import { OrMigrationContext } from '../../types';
|
|
4
7
|
|
|
5
8
|
/** @type {import('sequelize-cli').Migration} */
|
|
6
9
|
module.exports = {
|
|
7
|
-
async up(queryInterface: QueryInterface &
|
|
10
|
+
async up(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
8
11
|
await queryInterface.context.sequelize.query(`
|
|
9
12
|
ALTER TABLE datasources
|
|
10
13
|
ADD COLUMN IF NOT EXISTS enabled BOOLEAN NOT NULL DEFAULT TRUE;
|
|
11
14
|
`);
|
|
12
15
|
},
|
|
13
16
|
|
|
14
|
-
async down(queryInterface: QueryInterface &
|
|
17
|
+
async down(queryInterface: MigrationParams<QueryInterface & OrMigrationContext>) {
|
|
15
18
|
await queryInterface.context.sequelize.query(`
|
|
16
19
|
ALTER TABLE datasources
|
|
17
20
|
DROP COLUMN IF EXISTS enabled;
|