fix(store): migration 012 — back-fill auto_summarize via RLS bypass
Migration 011's UPDATE ran without tapir.current_user_id set, so FORCE RLS blocked all rows and 0 users were updated (skipped_manual=607 in scheduler). Migration 012 temporarily drops FORCE so the table owner can run the UPDATE, then restores it.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
-- No data revert: do not flip users back to manual on rollback.
|
||||
@@ -0,0 +1,6 @@
|
||||
-- Migration 011's UPDATE ran without tapir.current_user_id set, so FORCE RLS
|
||||
-- blocked all rows and zero users were updated. Temporarily drop FORCE so the
|
||||
-- table owner (tapir role) can bypass RLS for this back-fill, then restore it.
|
||||
ALTER TABLE users NO FORCE ROW LEVEL SECURITY;
|
||||
UPDATE users SET auto_summarize = TRUE WHERE auto_summarize = FALSE;
|
||||
ALTER TABLE users FORCE ROW LEVEL SECURITY;
|
||||
Reference in New Issue
Block a user