pangolin/server/setup
Hayyan Hajwani 9298ec7cdb fix(setup): correct month index and zero-pad database backup file names
Backup names were built inline from Date#getMonth, which is zero-indexed, so a
backup taken on 12 September 2026 was written as db_2026-8-12_20-35-56.sqlite.
No field was zero-padded either, giving names like db_2026-8-12_20-36-2.sqlite.

Extract formatBackupTimestamp into server/lib and use it from both places that
built the string: the backupDb helper in migrationsSqlite.ts and the inline copy
in the 1.0.0-beta9 setup script. Padding every field also makes the names sort
lexicographically in the order the backups were taken.

Adds tests covering both reported names, single-digit padding and sort order.
Reverting the helper to the old formula fails them with the exact name from the
report.
2026-09-16 13:46:57 +05:30
..
scriptsPg fix premature migration execution 2026-09-15 20:44:17 -04:00
scriptsSqlite fix(setup): correct month index and zero-pad database backup file names 2026-09-16 13:46:57 +05:30
.gitignore Setting up drizzle and fix site not showing in private resource 2026-02-12 12:05:15 -08:00
clearStaleData.ts get coutry using maxmind and clear stale device codes 2025-12-08 21:12:19 -05:00
copyInConfig.ts Handle billing bad subs, remove exit node name from lock, prevent some 2026-02-22 20:45:53 -08:00
ensureActions.ts Dont run on cloud 2026-07-01 22:07:33 -04:00
ensureRootApiKey.ts Remove debug log 2026-04-20 17:05:47 -07:00
ensureSetupToken.ts Properly insert PANGOLIN_SETUP_TOKEN into db 2026-01-28 15:03:31 -08:00
index.ts Add ability to predefine a root api key 2026-04-20 12:19:21 -07:00
migrationsPg.ts bump version and add 1.23 migrations 2026-09-14 17:18:31 -04:00
migrationsSqlite.ts fix(setup): correct month index and zero-pad database backup file names 2026-09-16 13:46:57 +05:30