Mandantenfähigkeit V1 #10

Merged
Lars merged 17 commits from develop into main 2026-05-05 22:34:25 +02:00
3 changed files with 18 additions and 7 deletions
Showing only changes of commit c7bf7dcd9d - Show all commits

View File

@ -47,11 +47,15 @@ WHERE t.trainer_id IS NOT NULL
ON CONFLICT (profile_id, club_id) DO NOTHING;
INSERT INTO club_members (profile_id, club_id, status)
SELECT DISTINCT elem::int, t.club_id, 'active'
FROM training_groups t,
LATERAL jsonb_array_elements_text(t.co_trainer_ids) AS elem
WHERE jsonb_typeof(t.co_trainer_ids) = 'array'
AND jsonb_array_length(t.co_trainer_ids) > 0
SELECT DISTINCT elem::int, x.club_id, 'active'
FROM (
SELECT club_id, co_trainer_ids
FROM training_groups
WHERE CASE WHEN jsonb_typeof(co_trainer_ids) = 'array'
THEN jsonb_array_length(co_trainer_ids)
ELSE 0 END > 0
) x,
LATERAL jsonb_array_elements_text(x.co_trainer_ids) AS elem
ON CONFLICT (profile_id, club_id) DO NOTHING;
INSERT INTO club_member_roles (club_member_id, role_code)

View File

@ -1,6 +1,6 @@
# Shinkan Jinkendo Version Information
APP_VERSION = "0.8.14"
APP_VERSION = "0.8.15"
BUILD_DATE = "2026-05-05"
DB_SCHEMA_VERSION = "20260505039"
@ -23,6 +23,13 @@ MODULE_VERSIONS = {
}
CHANGELOG = [
{
"version": "0.8.15",
"date": "2026-05-05",
"changes": [
"DB 039 Fix: Co-Trainer-Backfill über Subquery + CASE (kein jsonb_array_length/jsonb_array_elements auf Nicht-Arrays durch Planner/LATERAL-Reihenfolge)",
],
},
{
"version": "0.8.14",
"date": "2026-05-05",

View File

@ -1,6 +1,6 @@
// Shinkan Jinkendo Frontend Version
export const APP_VERSION = "0.8.14"
export const APP_VERSION = "0.8.15"
export const BUILD_DATE = "2026-05-05"
export const PAGE_VERSIONS = {