Skip to content

Commit 69b6049

Browse files
committed
feat: add codeium_api_key column to config table
1 parent 07f6374 commit 69b6049

4 files changed

Lines changed: 269 additions & 0 deletions

File tree

packages/api/db/schema.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const configs = sqliteTable('config', {
1515
aiProvider: text('ai_provider').notNull().default('openai'),
1616
aiModel: text('ai_model').default('gpt-4o'),
1717
aiBaseUrl: text('ai_base_url'),
18+
codeiumApiKey: text('codeium_api_key'),
1819
// Null: unset. Email: subscribed. "dismissed": dismissed the dialog.
1920
subscriptionEmail: text('subscription_email'),
2021
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `config` ADD `codeium_api_key` text;
Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
{
2+
"version": "6",
3+
"dialect": "sqlite",
4+
"id": "a22c9bdd-1d54-448d-9c4a-5c3b2d7b7d60",
5+
"prevId": "aeb418fb-06df-4fc2-8afc-f18d95014b46",
6+
"tables": {
7+
"apps": {
8+
"name": "apps",
9+
"columns": {
10+
"id": {
11+
"name": "id",
12+
"type": "integer",
13+
"primaryKey": true,
14+
"notNull": true,
15+
"autoincrement": false
16+
},
17+
"name": {
18+
"name": "name",
19+
"type": "text",
20+
"primaryKey": false,
21+
"notNull": true,
22+
"autoincrement": false
23+
},
24+
"language": {
25+
"name": "language",
26+
"type": "text",
27+
"primaryKey": false,
28+
"notNull": true,
29+
"autoincrement": false
30+
},
31+
"external_id": {
32+
"name": "external_id",
33+
"type": "text",
34+
"primaryKey": false,
35+
"notNull": true,
36+
"autoincrement": false
37+
},
38+
"created_at": {
39+
"name": "created_at",
40+
"type": "integer",
41+
"primaryKey": false,
42+
"notNull": true,
43+
"autoincrement": false,
44+
"default": "(unixepoch())"
45+
},
46+
"updated_at": {
47+
"name": "updated_at",
48+
"type": "integer",
49+
"primaryKey": false,
50+
"notNull": true,
51+
"autoincrement": false,
52+
"default": "(unixepoch())"
53+
}
54+
},
55+
"indexes": {
56+
"apps_external_id_unique": {
57+
"name": "apps_external_id_unique",
58+
"columns": [
59+
"external_id"
60+
],
61+
"isUnique": true
62+
}
63+
},
64+
"foreignKeys": {},
65+
"compositePrimaryKeys": {},
66+
"uniqueConstraints": {}
67+
},
68+
"config": {
69+
"name": "config",
70+
"columns": {
71+
"base_dir": {
72+
"name": "base_dir",
73+
"type": "text",
74+
"primaryKey": false,
75+
"notNull": true,
76+
"autoincrement": false
77+
},
78+
"default_language": {
79+
"name": "default_language",
80+
"type": "text",
81+
"primaryKey": false,
82+
"notNull": true,
83+
"autoincrement": false,
84+
"default": "'typescript'"
85+
},
86+
"openai_api_key": {
87+
"name": "openai_api_key",
88+
"type": "text",
89+
"primaryKey": false,
90+
"notNull": false,
91+
"autoincrement": false
92+
},
93+
"anthropic_api_key": {
94+
"name": "anthropic_api_key",
95+
"type": "text",
96+
"primaryKey": false,
97+
"notNull": false,
98+
"autoincrement": false
99+
},
100+
"enabled_analytics": {
101+
"name": "enabled_analytics",
102+
"type": "integer",
103+
"primaryKey": false,
104+
"notNull": true,
105+
"autoincrement": false,
106+
"default": true
107+
},
108+
"srcbook_installation_id": {
109+
"name": "srcbook_installation_id",
110+
"type": "text",
111+
"primaryKey": false,
112+
"notNull": true,
113+
"autoincrement": false,
114+
"default": "'k9nek54ld4r5881475jtrr5jns'"
115+
},
116+
"ai_provider": {
117+
"name": "ai_provider",
118+
"type": "text",
119+
"primaryKey": false,
120+
"notNull": true,
121+
"autoincrement": false,
122+
"default": "'openai'"
123+
},
124+
"ai_model": {
125+
"name": "ai_model",
126+
"type": "text",
127+
"primaryKey": false,
128+
"notNull": false,
129+
"autoincrement": false,
130+
"default": "'gpt-4o'"
131+
},
132+
"ai_base_url": {
133+
"name": "ai_base_url",
134+
"type": "text",
135+
"primaryKey": false,
136+
"notNull": false,
137+
"autoincrement": false
138+
},
139+
"codeium_api_key": {
140+
"name": "codeium_api_key",
141+
"type": "text",
142+
"primaryKey": false,
143+
"notNull": false,
144+
"autoincrement": false
145+
},
146+
"subscription_email": {
147+
"name": "subscription_email",
148+
"type": "text",
149+
"primaryKey": false,
150+
"notNull": false,
151+
"autoincrement": false
152+
}
153+
},
154+
"indexes": {},
155+
"foreignKeys": {},
156+
"compositePrimaryKeys": {},
157+
"uniqueConstraints": {}
158+
},
159+
"secrets": {
160+
"name": "secrets",
161+
"columns": {
162+
"id": {
163+
"name": "id",
164+
"type": "integer",
165+
"primaryKey": true,
166+
"notNull": true,
167+
"autoincrement": false
168+
},
169+
"name": {
170+
"name": "name",
171+
"type": "text",
172+
"primaryKey": false,
173+
"notNull": true,
174+
"autoincrement": false
175+
},
176+
"value": {
177+
"name": "value",
178+
"type": "text",
179+
"primaryKey": false,
180+
"notNull": true,
181+
"autoincrement": false
182+
}
183+
},
184+
"indexes": {
185+
"secrets_name_unique": {
186+
"name": "secrets_name_unique",
187+
"columns": [
188+
"name"
189+
],
190+
"isUnique": true
191+
}
192+
},
193+
"foreignKeys": {},
194+
"compositePrimaryKeys": {},
195+
"uniqueConstraints": {}
196+
},
197+
"secrets_to_sessions": {
198+
"name": "secrets_to_sessions",
199+
"columns": {
200+
"id": {
201+
"name": "id",
202+
"type": "integer",
203+
"primaryKey": true,
204+
"notNull": true,
205+
"autoincrement": false
206+
},
207+
"session_id": {
208+
"name": "session_id",
209+
"type": "text",
210+
"primaryKey": false,
211+
"notNull": true,
212+
"autoincrement": false
213+
},
214+
"secret_id": {
215+
"name": "secret_id",
216+
"type": "integer",
217+
"primaryKey": false,
218+
"notNull": true,
219+
"autoincrement": false
220+
}
221+
},
222+
"indexes": {
223+
"secrets_to_sessions_session_id_secret_id_unique": {
224+
"name": "secrets_to_sessions_session_id_secret_id_unique",
225+
"columns": [
226+
"session_id",
227+
"secret_id"
228+
],
229+
"isUnique": true
230+
}
231+
},
232+
"foreignKeys": {
233+
"secrets_to_sessions_secret_id_secrets_id_fk": {
234+
"name": "secrets_to_sessions_secret_id_secrets_id_fk",
235+
"tableFrom": "secrets_to_sessions",
236+
"tableTo": "secrets",
237+
"columnsFrom": [
238+
"secret_id"
239+
],
240+
"columnsTo": [
241+
"id"
242+
],
243+
"onDelete": "no action",
244+
"onUpdate": "no action"
245+
}
246+
},
247+
"compositePrimaryKeys": {},
248+
"uniqueConstraints": {}
249+
}
250+
},
251+
"enums": {},
252+
"_meta": {
253+
"schemas": {},
254+
"tables": {},
255+
"columns": {}
256+
},
257+
"internal": {
258+
"indexes": {}
259+
}
260+
}

packages/api/drizzle/meta/_journal.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
"when": 1726808187994,
7979
"tag": "0010_create_apps",
8080
"breakpoints": true
81+
},
82+
{
83+
"idx": 11,
84+
"version": "6",
85+
"when": 1728410206740,
86+
"tag": "0011_add_codeium_api_key_to_config",
87+
"breakpoints": true
8188
}
8289
]
8390
}

0 commit comments

Comments
 (0)