返回 oh-my-ppt
add-source-page-skeleton-agenda-items.ts
根目录 / src / main / db / patch / add-source-page-skeleton-agenda-items.ts
1 import type { createClient } from '@libsql/client'
2
3 type LibSqlClient = ReturnType<typeof createClient>
4
5 /** Persist structured section-agenda topics independently from the mutable reason text. */
6 export const patchSourcePageSkeletonAgendaItems = async (client: LibSqlClient): Promise<void> => {
7 const columns = await client.execute("PRAGMA table_info('source_page_skeletons')")
8 if (columns.rows.some((row) => row.name === 'agenda_items_json')) return
9
10 await client.execute('ALTER TABLE source_page_skeletons ADD COLUMN agenda_items_json TEXT')
11 }
12
12 lines TYPESCRIPT