DocsLovable to Supabase
Documentation

Lovable to Supabase migration

Miglify supports Lovable/GitHub-backed workflows connected to user-owned Supabase projects.

How Lovable/GitHub-backed workflows work

Lovable projects that are connected to a user-owned Supabase project and backed by a GitHub repository can be analyzed by Miglify.

What Miglify can analyze

  • Repository structure through GitHub OAuth
  • Supabase database schema, storage, and auth
  • Edge Function source code when available in the repo
  • Required secret names

What can be migrated

  • Database, auth users, and storage from the connected Supabase project
  • Detected Edge Functions, where deployment requirements are met

GitHub repository connection

Use the GitHub OAuth flow to pick the exact repository backing your project. Miglify only accesses what you authorize.

Supabase destination setup

Prepare a destination Supabase project and connect it in the Start Migration flow.

Secrets and environment variables

Miglify detects secret names used by Edge Functions. You provide destination values directly.

Edge Functions

Miglify detects Edge Functions and evaluates deployment readiness based on available source code, required Secrets, and Supabase authorization. Supported functions are deployed through the migration workflow.

Cases that need extra input

  • Repository not connected or not accessible
  • Function present in Supabase but missing from the repo
  • Secret values that must be provided securely for the destination

Recommended first run

Start with a test Lovable/GitHub-backed project connected to a fresh Supabase destination to validate the workflow end to end.

Updating Your Lovable App After Migration

After migrating a Lovable project to your own Supabase, you can continue using Lovable to build and update your application normally.

However, do not publish a new Lovable version immediately after making changes.

Before publishing, use Miglify to verify that the protected backend connection has not changed.

  1. Make your changes in Lovable as usual.
  2. Do not publish the new version yet.
  3. Open Miglify → Connections and select your project.
  4. Click Verify connection.
  5. If the Connection is Healthy, you can publish the Lovable update.
  6. If Miglify reports Drift detected, click Review repair.
  7. Review the proposed repair actions. Miglify repairs only the protected backend connection configuration and does not intentionally overwrite unrelated application features, pages, components, or other application code.
  8. Click Repair connection.
  9. Run Verify connection again.
  10. Once the Connection returns to Healthy, publish the Lovable update.
  11. After publishing, test the live application to confirm the updated feature and critical workflows are working correctly.
Important
Do not manually reconnect or replace your Supabase project when Miglify detects connection drift. Review the repair first so Miglify can restore only the protected backend configuration while preserving your new application changes.

Why this step is necessary

Lovable may occasionally regenerate or restore environment configuration while modifying an application.

This can cause the new version of an app to reference a previous backend even when the feature you asked Lovable to build is correct.

Miglify protects against this by checking the protected backend connection before the new application version reaches production.

A protected connection may include configuration such as:

  • Supabase URL
  • Supabase project reference
  • Supabase publishable-key binding
  • Supabase client binding
  • Other connection-specific configuration protected by Miglify

Miglify does not overwrite your entire application. The goal is to protect the backend connection while allowing you to continue developing your application normally.

If Drift Is Detected

If Miglify detects drift after a Lovable update, do not publish the app yet.

  1. 1Lovable feature change
  2. 2Miglify detects protected backend drift
  3. 3Review repair
  4. 4Repair connection
  5. 5Miglify restores only the protected connection configuration
  6. 6Your legitimate application changes remain intact
  7. 7Verify connection again
  8. 8Connection returns to Healthy
  9. 9Publish the Lovable update

Recommended Post-Publish Check

After publishing, perform a quick live smoke test. Depending on your application, this may include:

  • Sign in
  • Sign out
  • Create a test account
  • Test Google or other OAuth login
  • Load important database-backed pages
  • Perform one important database action
  • Test Storage if the update affects files
  • Test any critical workflow changed by the update

You can also run Verify connection again in Miglify after publishing for additional confirmation.

Simple Rule
Build in Lovable → Verify in Miglify → Repair if necessary → Publish
This workflow allows you to keep using Lovable as your builder while keeping your own Supabase backend protected.
Note
This guide covers normal Lovable projects connected to your own Supabase project. Lovable Cloud is a separate workflow — see the Lovable Cloud section of Supported workflows.
Ready to start?
Create a migration when your source, destination, and required credentials are ready.
Start Migration