Sync was blocked because the migration registry table creation required CREATE TABLE permissions that the database user might not have. Changes: - Check if migration registry tables exist before attempting to create them - Skip creation if table exists and user lacks CREATE permissions - Use information_schema to reliably check table existence - Apply same fix to user sync status table creation - Gracefully handle ALTER TABLE failures for backward compatibility This allows sync to proceed even if the client is a read-limited database user, as long as the required tables have already been created by an administrator. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
12 KiB
12 KiB