File size: 413 Bytes
88c4c60
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
// Migration registry — append new entries when schema changes.
// Each migration: { version: number, name: string, up(db): void }
// Versions MUST be unique and monotonically increasing.
import m001 from "./001-initial.js";

export const MIGRATIONS = [m001].sort((a, b) => a.version - b.version);

export function latestVersion() {
  return MIGRATIONS.length ? MIGRATIONS[MIGRATIONS.length - 1].version : 0;
}