Lovable Cloud to Supabase Migr... Note

Lovable Cloud to Supabase Migration Checklist

Migrating from Lovable Cloud to Supabase involves more than a simple database dump and restore. Many issues arise post-migration, especially concerning authentication, AI features, and email services. A comprehensive checklist is crucial, which prompted the creation of a free migration checker that analyzes GitHub repositories. Lovable Cloud projects contain essential backend components like 'supabase/migrations' for schema changes, 'supabase/functions' for edge functions, and 'supabase/config.toml' for project configuration. Critically, the generated type file 'src/integrations/supabase/types.ts' provides an accurate list of public tables, revealing schema drift where Cloud UI changes weren't recorded in migrations.The migration process should prioritize extensions, then schema, followed by functions, triggers, and finally data. Special attention is needed for triggers on 'auth.users' to prevent issues with new user profiles. Copying the 'auth' schema, including 'auth.users' and 'auth.identities' with password hashes, is vital to ensure users can log in with their existing credentials. Storage migration is particularly annoying, requiring either scripting against the storage API or using 'rclone' to transfer files between S3 endpoints; buckets must be recreated with identical names and settings.Common post-migration breakage points include Google sign-in, which defaults to Lovable's OAuth broker in older projects. This necessitates setting up your own OAuth client in Google Cloud Console and updating the frontend calls to use plain 'supabase.auth.signInWithOAuth'. Lovable's AI gateway calls, embedded in edge functions, will fail outside Lovable Cloud, requiring a new AI provider key and URL. Signup emails also stop arriving, as a fresh Supabase project's email service is restricted; a custom SMTP like Resend or Postmark is required.Furthermore, cron jobs, often overlooked, might have the old project's URL hardcoded, continuing to call the defunct Lovable Cloud instance. The migration checker addresses these issues by pattern-matching files from public GitHub repos. While fast and dependency-free, it relies on regular expressions for SQL parsing and cannot detect dashboard-made changes not reflected in migrations. It serves as a checklist rather than a definitive audit. For those preferring professional assistance, fixed-price migration services are available.