dev-main #1

Merged
senior merged 6 commits from dev-main into main 2026-08-08 07:07:23 +00:00
Showing only changes of commit 1d39bc03d8 - Show all commits

View File

@@ -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;