chore: bump version to 0.8.15 and update changelog
- Updated application version to 0.8.15 in both backend and frontend files. - Enhanced database migration logic for co-trainer backfill using a subquery and CASE statement, improving robustness. - Updated changelog to reflect the new version and changes made.
This commit is contained in:
1 parent
e69aca51f6
commit
c7bf7dcd9d
3 files changed
+18
-7
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user