@@ -4,7 +4,6 @@ import { pgTable, primaryKey, text } from 'drizzle-orm/pg-core';
4
4
5
5
import { agents , agentsFiles , agentsKnowledgeBases } from './agent' ;
6
6
import { asyncTasks } from './asyncTask' ;
7
- import { agentsTags , plugins , pluginsTags , tags } from './discover' ;
8
7
import { files , knowledgeBases } from './file' ;
9
8
import { messages , messagesFiles } from './message' ;
10
9
import { unstructuredChunks } from './rag' ;
@@ -48,26 +47,6 @@ export const topicRelations = relations(topics, ({ one }) => ({
48
47
} ) ,
49
48
} ) ) ;
50
49
51
- export const pluginsRelations = relations ( plugins , ( { many } ) => ( {
52
- pluginsTags : many ( pluginsTags ) ,
53
- } ) ) ;
54
-
55
- export const pluginsTagsRelations = relations ( pluginsTags , ( { one } ) => ( {
56
- plugin : one ( plugins , {
57
- fields : [ pluginsTags . pluginId ] ,
58
- references : [ plugins . id ] ,
59
- } ) ,
60
- tag : one ( tags , {
61
- fields : [ pluginsTags . tagId ] ,
62
- references : [ tags . id ] ,
63
- } ) ,
64
- } ) ) ;
65
-
66
- export const tagsRelations = relations ( tags , ( { many } ) => ( {
67
- agentsTags : many ( agentsTags ) ,
68
- pluginsTags : many ( pluginsTags ) ,
69
- } ) ) ;
70
-
71
50
export const messagesRelations = relations ( messages , ( { many, one } ) => ( {
72
51
filesToMessages : many ( messagesFiles ) ,
73
52
@@ -91,7 +70,6 @@ export const agentsRelations = relations(agents, ({ many }) => ({
91
70
agentsToSessions : many ( agentsToSessions ) ,
92
71
knowledgeBases : many ( agentsKnowledgeBases ) ,
93
72
files : many ( agentsFiles ) ,
94
- agentsTags : many ( agentsTags ) ,
95
73
} ) ) ;
96
74
97
75
export const agentsToSessionsRelations = relations ( agentsToSessions , ( { one } ) => ( {
@@ -116,17 +94,6 @@ export const agentsKnowledgeBasesRelations = relations(agentsKnowledgeBases, ({
116
94
} ) ,
117
95
} ) ) ;
118
96
119
- export const agentsTagsRelations = relations ( agentsTags , ( { one } ) => ( {
120
- agent : one ( agents , {
121
- fields : [ agentsTags . agentId ] ,
122
- references : [ agents . id ] ,
123
- } ) ,
124
- tag : one ( tags , {
125
- fields : [ agentsTags . tagId ] ,
126
- references : [ tags . id ] ,
127
- } ) ,
128
- } ) ) ;
129
-
130
97
export const sessionsRelations = relations ( sessions , ( { many, one } ) => ( {
131
98
filesToSessions : many ( filesToSessions ) ,
132
99
agentsToSessions : many ( agentsToSessions ) ,
0 commit comments