feat: add embeds database table with schema and migration

This commit is contained in:
Jannis Braun
2026-03-20 23:28:57 +01:00
parent 009923a12f
commit ebc1868dd1
2 changed files with 49 additions and 0 deletions
+17
View File
@@ -92,6 +92,23 @@ export const attachments = sqliteTable('attachments', {
createdAt: integer('created_at').notNull(),
});
export const embeds = sqliteTable('embeds', {
id: text('id').primaryKey(),
messageId: text('message_id').references(() => messages.id, { onDelete: 'cascade' }),
dmMessageId: text('dm_message_id').references(() => dmMessages.id, { onDelete: 'cascade' }),
url: text('url').notNull(),
embedType: text('embed_type').notNull(),
provider: text('provider'),
title: text('title'),
description: text('description'),
image: text('image'),
embedUrl: text('embed_url'),
width: integer('width'),
height: integer('height'),
color: text('color'),
createdAt: integer('created_at').notNull(),
});
export const dmChannels = sqliteTable('dm_channels', {
id: text('id').primaryKey(),
ownerId: text('owner_id'),