* Get list of applied migrations with filenames
()
| 109 | * Get list of applied migrations with filenames |
| 110 | */ |
| 111 | async function getAppliedMigrations(): Promise<Array<{ version: number; filename: string }>> { |
| 112 | const pool = getPool(); |
| 113 | |
| 114 | const result = await pool.query<{ version: number; filename: string }>( |
| 115 | "SELECT version, filename FROM schema_migrations ORDER BY version" |
| 116 | ); |
| 117 | |
| 118 | return result.rows; |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * Apply a single migration |
no test coverage detected