fix
This commit is contained in:
@@ -26,10 +26,11 @@ WHERE c.id = sub.company_id
|
||||
UPDATE companies c
|
||||
SET owner_user_id = u.id
|
||||
FROM users u
|
||||
JOIN memberships m ON m.user_id = u.id AND m.company_id = c.id AND m.status = 'active'
|
||||
WHERE c.legacy_company_id = '97e1a309-3d23-4aa2-b518-8e8d7afdfec7'
|
||||
INNER JOIN memberships m ON m.user_id = u.id AND m.status = 'active'
|
||||
WHERE c.id = m.company_id
|
||||
AND c.legacy_company_id = '97e1a309-3d23-4aa2-b518-8e8d7afdfec7'
|
||||
AND lower(u.email) = 'a1-primary@descrybe.local';
|
||||
|
||||
-- +goose Down
|
||||
DROP INDEX IF EXISTS companies_owner_user_id_idx;
|
||||
ALTER TABLE companies DROP COLUMN IF EXISTS owner_user_id;
|
||||
ALTER TABLE companies DROP COLUMN IF EXISTS owner_user_id;
|
||||
Reference in New Issue
Block a user