Fix DB schema for language models (#133)

This commit is contained in:
Will Chen
2025-05-12 15:14:27 -07:00
committed by GitHub
parent 642895f0ba
commit c63781d7cc
4 changed files with 7 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ CREATE TABLE `language_model_providers` (
); );
--> statement-breakpoint --> statement-breakpoint
CREATE TABLE `language_models` ( CREATE TABLE `language_models` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `id` text PRIMARY KEY NOT NULL,
`name` text NOT NULL, `name` text NOT NULL,
`provider_id` text NOT NULL, `provider_id` text NOT NULL,
`description` text, `description` text,

View File

@@ -1,7 +1,7 @@
{ {
"version": "6", "version": "6",
"dialect": "sqlite", "dialect": "sqlite",
"id": "29ca03c0-a5d6-4db2-a84a-03721206fdb4", "id": "f2ef6f83-09f5-4932-b7a0-4b205ba542ec",
"prevId": "ceedb797-6aa3-4a50-b42f-bc85ee08b3df", "prevId": "ceedb797-6aa3-4a50-b42f-bc85ee08b3df",
"tables": { "tables": {
"apps": { "apps": {
@@ -191,10 +191,10 @@
"columns": { "columns": {
"id": { "id": {
"name": "id", "name": "id",
"type": "integer", "type": "text",
"primaryKey": true, "primaryKey": true,
"notNull": true, "notNull": true,
"autoincrement": true "autoincrement": false
}, },
"name": { "name": {
"name": "name", "name": "name",

View File

@@ -40,8 +40,8 @@
{ {
"idx": 5, "idx": 5,
"version": "6", "version": "6",
"when": 1747083562867, "when": 1747087890389,
"tag": "0005_left_thor", "tag": "0005_hesitant_sister_grimm",
"breakpoints": true "breakpoints": true
} }
] ]

View File

@@ -82,7 +82,7 @@ export const language_model_providers = sqliteTable(
); );
export const language_models = sqliteTable("language_models", { export const language_models = sqliteTable("language_models", {
id: integer("id").primaryKey({ autoIncrement: true }), id: text("id").primaryKey(),
name: text("name").notNull(), name: text("name").notNull(),
provider_id: text("provider_id") provider_id: text("provider_id")
.notNull() .notNull()