d18ada4ee7
Docker Publish / docker (web, apps/web/Dockerfile, web) (push) Failing after 0s
Docker Publish / docker (api, apps/api/Dockerfile, api) (push) Failing after 1s
Publish Extension / detect-version (push) Has been skipped
Publish Extension / submit (push) Has been cancelled
36 lines
1.4 KiB
TypeScript
36 lines
1.4 KiB
TypeScript
import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core'
|
|
|
|
export const downloadHistoryTable = sqliteTable('download_history', {
|
|
id: text('id').primaryKey(),
|
|
url: text('url').notNull(),
|
|
title: text('title').notNull(),
|
|
thumbnail: text('thumbnail'),
|
|
type: text('type').notNull(),
|
|
status: text('status').notNull(),
|
|
downloadPath: text('download_path'),
|
|
savedFileName: text('saved_file_name'),
|
|
fileSize: integer('file_size', { mode: 'number' }),
|
|
duration: integer('duration', { mode: 'number' }),
|
|
downloadedAt: integer('downloaded_at', { mode: 'number' }).notNull(),
|
|
completedAt: integer('completed_at', { mode: 'number' }),
|
|
sortKey: integer('sort_key', { mode: 'number' }).notNull(),
|
|
error: text('error'),
|
|
ytDlpCommand: text('yt_dlp_command'),
|
|
ytDlpLog: text('yt_dlp_log'),
|
|
description: text('description'),
|
|
channel: text('channel'),
|
|
uploader: text('uploader'),
|
|
viewCount: integer('view_count', { mode: 'number' }),
|
|
tags: text('tags'),
|
|
origin: text('origin'),
|
|
subscriptionId: text('subscription_id'),
|
|
selectedFormat: text('selected_format'),
|
|
playlistId: text('playlist_id'),
|
|
playlistTitle: text('playlist_title'),
|
|
playlistIndex: integer('playlist_index', { mode: 'number' }),
|
|
playlistSize: integer('playlist_size', { mode: 'number' })
|
|
})
|
|
|
|
export type DownloadHistoryRow = typeof downloadHistoryTable.$inferSelect
|
|
export type DownloadHistoryInsert = typeof downloadHistoryTable.$inferInsert
|