From 1d39bc03d85621eafdf10a572e1b39da5ae0974a Mon Sep 17 00:00:00 2001 From: senior Date: Thu, 6 Aug 2026 05:10:47 +0000 Subject: [PATCH 1/6] Update SQL/postgres.initial.sql makes the script safe to re-run against an already-migrated database --- SQL/postgres.initial.sql | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql index 2363c6c..9ccfab3 100644 --- a/SQL/postgres.initial.sql +++ b/SQL/postgres.initial.sql @@ -1,4 +1,13 @@ -CREATE TABLE ident_switch +-- Patched version of SQL/postgres.initial.sql for gecka/ident-switch. +-- Commit this into your Gitea fork at the same path, replacing the +-- upstream file. Only two changes from upstream: +-- 1. CREATE TABLE / CREATE INDEX -> IF NOT EXISTS +-- 2. INSERT INTO system -> upsert via ON CONFLICT +-- This makes the script safe to re-run against an already-migrated +-- database, which happens on every container restart unless +-- /var/www/html is persisted (composer re-installs "fresh" each time). + +CREATE TABLE IF NOT EXISTS ident_switch ( id serial @@ -82,8 +91,9 @@ CREATE TABLE ident_switch UNIQUE (user_id, label) ); -CREATE INDEX IX_ident_switch_user_id ON ident_switch(user_id); -CREATE INDEX IX_ident_switch_iid ON ident_switch(iid); -CREATE INDEX IX_ident_switch_parent_id ON ident_switch(parent_id); +CREATE INDEX IF NOT EXISTS IX_ident_switch_user_id ON ident_switch(user_id); +CREATE INDEX IF NOT EXISTS IX_ident_switch_iid ON ident_switch(iid); +CREATE INDEX IF NOT EXISTS IX_ident_switch_parent_id ON ident_switch(parent_id); -INSERT INTO system (name, value) VALUES ('ident_switch-version', '2026021000'); +INSERT INTO system (name, value) VALUES ('ident_switch-version', '2026021000') +ON CONFLICT (name) DO UPDATE SET value = EXCLUDED.value; \ No newline at end of file -- 2.49.1 From 1499347b7bcbc2868e457dd0f12ecc5531563141 Mon Sep 17 00:00:00 2001 From: senior Date: Fri, 7 Aug 2026 19:41:40 +0000 Subject: [PATCH 2/6] added workbench to list of skins --- ident_switch-switch.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ident_switch-switch.js b/ident_switch-switch.js index ffe42c2..ae1cd6e 100644 --- a/ident_switch-switch.js +++ b/ident_switch-switch.js @@ -2,7 +2,7 @@ * ident_switch - Account switcher UI and new mail notifications. * * Places the hidden from the footer into the appropriate - * skin location (Larry, Classic, Elastic), Workbench, shows it, and registers + * skin location (Larry, Classic, Elastic, Workbench), shows it, and registers * notification listeners for background mail checking. * * Copyright (C) 2016-2018 Boris Gulay @@ -22,7 +22,6 @@ $(function() { var $sw = $wrapper.find('#plugin-ident_switch-account'); var placed = false; - switch (rcmail.env.skin) { case 'larry': placed = plugin_switchIdent_addCbLarry($wrapper, $sw); -- 2.49.1 From 85a0d4f9ecca306cbadba00909fbb782e95b6d0f Mon Sep 17 00:00:00 2001 From: Milos Sen Date: Sat, 8 Aug 2026 09:03:01 +0300 Subject: [PATCH 4/6] change plugi name --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d0c1980..f0c2681 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "gecka/ident-switch", + "name": "senior/s-ident-switch", "type": "roundcube-plugin", "description": "This plugin allows users to switch between different accounts (including remote) in single Roundcube session.", "homepage": "https://github.com/Gecka-Apps/roundcube-ident_switch", -- 2.49.1 From 64d2ff3e986cfc7f9ef4d86ceba81565cbbbbf3b Mon Sep 17 00:00:00 2001 From: Milos Sen Date: Sat, 8 Aug 2026 09:20:09 +0300 Subject: [PATCH 5/6] change plugi name --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f0c2681..0d96355 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "senior/s-ident-switch", + "name": "senior/ident-switch", "type": "roundcube-plugin", "description": "This plugin allows users to switch between different accounts (including remote) in single Roundcube session.", "homepage": "https://github.com/Gecka-Apps/roundcube-ident_switch", -- 2.49.1 From 1a5b07273d9b171e1035402a0ae548c301b61348 Mon Sep 17 00:00:00 2001 From: Milos Sen Date: Sat, 8 Aug 2026 09:28:20 +0300 Subject: [PATCH 6/6] change plugin name --- composer.json | 2 +- ident_switch.php => s_ident_switch.php | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename ident_switch.php => s_ident_switch.php (100%) diff --git a/composer.json b/composer.json index 0d96355..f0c2681 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "senior/ident-switch", + "name": "senior/s-ident-switch", "type": "roundcube-plugin", "description": "This plugin allows users to switch between different accounts (including remote) in single Roundcube session.", "homepage": "https://github.com/Gecka-Apps/roundcube-ident_switch", diff --git a/ident_switch.php b/s_ident_switch.php similarity index 100% rename from ident_switch.php rename to s_ident_switch.php -- 2.49.1