From 66449bd19bded659f282003c9a588210e3187eb3 Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Mon, 2 Mar 2026 20:15:35 -0500 Subject: [PATCH] pgimport readme --- tools/pgimport/README.md | 6 +++++- tools/pgimport/main.go | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/pgimport/README.md b/tools/pgimport/README.md index 2c645405..f7352111 100644 --- a/tools/pgimport/README.md +++ b/tools/pgimport/README.md @@ -1,6 +1,10 @@ # pgimport -Migrates ntfy data from SQLite to PostgreSQL. +One-off migration script to import ntfy data from SQLite to PostgreSQL. + +This is **not** a generic migration tool. It only works with specific SQLite schema versions +(message cache v14, user db v6, web push v1) and their corresponding PostgreSQL schemas. +If your database versions differ, this tool will refuse to run. ## Build diff --git a/tools/pgimport/main.go b/tools/pgimport/main.go index 9af2212d..bf92a2a7 100644 --- a/tools/pgimport/main.go +++ b/tools/pgimport/main.go @@ -1,3 +1,6 @@ +// pgimport is a one-off migration script to import ntfy data from SQLite to PostgreSQL. +// It is not a generic migration tool. It expects specific schema versions for each database +// (message cache v14, user db v6, web push v1) and will refuse to run if versions don't match. package main import ( @@ -33,7 +36,7 @@ var flags = []cli.Flag{ func main() { app := &cli.App{ Name: "pgimport", - Usage: "SQLite to PostgreSQL migration tool for ntfy", + Usage: "One-off SQLite to PostgreSQL migration script for ntfy", UsageText: "pgimport [OPTIONS]", Flags: flags, Before: loadConfigFile("config", flags),