Первоначальный коммит

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
poignatov-home
2026-02-08 17:01:36 +03:00
commit bad198ce29
217 changed files with 57075 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
-- Migration: Fix weekly_goals.user_id by updating it from projects.user_id
-- This migration fixes the issue where weekly_goals.user_id was incorrectly set to NULL or wrong user_id
-- It updates all weekly_goals records to have the correct user_id from their associated project
UPDATE weekly_goals wg
SET user_id = p.user_id
FROM projects p
WHERE wg.project_id = p.id
AND (wg.user_id IS NULL OR wg.user_id != p.user_id);