Skip to content

An AI-powered search engine with a generative UI

chore: remove schema backup file

Yoshiki Miura0bc0a36dcb9c
diff --git a/lib/db/schema.ts.backup b/lib/db/schema.ts.backup
deleted file mode 100644
index ca8aa26a..00000000
--- a/lib/db/schema.ts.backup
+++ /dev/null
@@ -1,57 +0,0 @@
-import { InferSelectModel } from 'drizzle-orm'
-import {
- json,
- pgTable,
- text,
- timestamp,
- uuid,
- varchar
-} from 'drizzle-orm/pg-core'
-
-export const chats = pgTable(
- 'chats',
- {
- id: uuid('id').primaryKey().notNull().defaultRandom(),
- createdAt: timestamp('created_at', { mode: 'string', withTimezone: true })
- .notNull()
- .defaultNow(),
- title: text('title').notNull(),
- userId: uuid('user_id').notNull(), // User ID from the authentication system
- visibility: varchar('visibility', {
- length: 256,
- enum: ['public', 'private']
- })
- .notNull()
- .default('private')
- },
- table => {
- return {
- enableRls: true
- }
- }
-)
-
-export type Chat = InferSelectModel<typeof chats>
-
-export const messages = pgTable(
- 'messages',
- {
- id: uuid('id').primaryKey().notNull().defaultRandom(),
- chatId: uuid('chat_id')
- .notNull()
- .references(() => chats.id, { onDelete: 'cascade' }),
- role: varchar('role', { length: 256 }).notNull(),
- parts: json('parts').notNull(), // Stores structured message content (e.g., Vercel AI SDK Message parts)
- attachments: json('attachments').notNull(),
- createdAt: timestamp('created_at', { mode: 'string', withTimezone: true })
- .notNull()
- .defaultNow()
- },
- table => {
- return {
- enableRls: true
- }
- }
-)
-
-export type Message = InferSelectModel<typeof messages>