* Create migrations tracking table
()
| 94 | * Create migrations tracking table |
| 95 | */ |
| 96 | async function createMigrationsTable(): Promise<void> { |
| 97 | const pool = getPool(); |
| 98 | |
| 99 | await pool.query(` |
| 100 | CREATE TABLE IF NOT EXISTS schema_migrations ( |
| 101 | version INTEGER PRIMARY KEY, |
| 102 | filename VARCHAR(255) NOT NULL, |
| 103 | applied_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() |
| 104 | ); |
| 105 | `); |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Get list of applied migrations with filenames |
no test coverage detected