Spaces:
Paused
Paused
Download scripts/show_columns.ts from Kraft102/widgettdc-api: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/spaces/Kraft102/widgettdc-api/resolve/main/scripts/show_columns.ts
- Command line
-
hf download hf://spaces/Kraft102/widgettdc-api/scripts/show_columns.ts
-
curl -L -o show_columns.ts https://huggingface.co/spaces/Kraft102/widgettdc-api/resolve/main/scripts/show_columns.ts
408 Bytes
| import { getDatabase, initializeDatabase } from '../apps/backend/src/database/index.ts'; | |
| async function showSchema() { | |
| await initializeDatabase(); | |
| const db = getDatabase(); | |
| const result = (db as any).exec("PRAGMA table_info(project_lifecycle_events)"); | |
| const cols = result[0].values.map((row: any) => row[1]); // column names | |
| console.log('Actual column names:', cols); | |
| } | |
| showSchema(); | |