Author: gbechis
Date: Wed Aug 26 08:17:13 2026
New Revision: 1937480
Log:
add migration scripts
Added:
spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_mysql.sql
spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_pg.sql
spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_sqlite.sql
Modified:
spamassassin/trunk/MANIFEST
Modified: spamassassin/trunk/MANIFEST
==============================================================================
--- spamassassin/trunk/MANIFEST Wed Aug 26 08:14:12 2026 (r1937479)
+++ spamassassin/trunk/MANIFEST Wed Aug 26 08:17:13 2026 (r1937480)
@@ -269,6 +269,9 @@ sql/decodeshorturl_sqlite.sql
sql/extracttext_mysql.sql
sql/extracttext_pg.sql
sql/extracttext_sqlite.sql
+sql/migrate_decodeshorturl_to_redirectors_mysql.sql
+sql/migrate_decodeshorturl_to_redirectors_pg.sql
+sql/migrate_decodeshorturl_to_redirectors_sqlite.sql
sql/neural_mysql.sql
sql/neural_pg.sql
sql/neural_sqlite.sql
Added: spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_mysql.sql
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_mysql.sql Wed Aug 26 08:17:13 2026 (r1937480)
@@ -0,0 +1,9 @@
+-- One-time migration of the deprecated DecodeShortURLs plugin's cache
+-- into the Redirectors plugin's cache. Run after redir_url_cache exists
+-- (created via sql/redirectors_mysql.sql).
+--
+-- Usage: mysql -u <user> -p <database> < migrate_decodeshorturl_to_redirectors_mysql.sql
+
+INSERT IGNORE INTO `redir_url_cache` (`redir_url`, `target_url`, `hits`, `created`, `modified`)
+SELECT `short_url`, `decoded_url`, `hits`, `created`, `modified`
+FROM `short_url_cache`;
\ No newline at end of file
Added: spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_pg.sql
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_pg.sql Wed Aug 26 08:17:13 2026 (r1937480)
@@ -0,0 +1,10 @@
+-- One-time migration of the deprecated DecodeShortURLs plugin's cache
+-- into the Redirectors plugin's cache. Run after redir_url_cache exists
+-- (created via sql/redirectors_pg.sql).
+--
+-- Usage: psql -U <user> -d <database> -f migrate_decodeshorturl_to_redirectors_pg.sql
+
+INSERT INTO redir_url_cache (redir_url, target_url, hits, created, modified)
+SELECT short_url, decoded_url, hits, created, modified
+FROM short_url_cache
+ON CONFLICT (redir_url) DO NOTHING;
\ No newline at end of file
Added: spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_sqlite.sql
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ spamassassin/trunk/sql/migrate_decodeshorturl_to_redirectors_sqlite.sql Wed Aug 26 08:17:13 2026 (r1937480)
@@ -0,0 +1,10 @@
+-- One-time migration of the deprecated DecodeShortURLs plugin's cache
+-- into the Redirectors plugin's cache. redir_url_cache is created
+-- automatically by the plugin on first run.
+--
+-- Usage: sqlite3 /path/to/cache.db < migrate_decodeshorturl_to_redirectors_sqlite.sql
+
+INSERT INTO redir_url_cache (redir_url, target_url, hits, created, modified)
+SELECT short_url, decoded_url, hits, created, modified
+FROM short_url_cache
+ON CONFLICT(redir_url) DO NOTHING;
\ No newline at end of file
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.