Aurabase Logo
aurabasedocs
docs›Guides›Supabase Migration

Migrate from Supabase

The client API, the RLS policies and the Edge Functions carry over. Restoring a dump and importing users with their passwords are not delivered yet: this page says exactly what works today.

10 min read·Level intermediate·Revised on Apr 15, 2026
This English text was generated automatically from the French original and has not been reviewed yet.
#
Compatibility

95% same as Supabase

The client API, the RLS policies, the auth model and the storage follow Supabase's conventions, so the application code changes very little. The table below states what is the same and what is not.

FeatureCompatibilityNote

createClient()SameImport @aurabase/aurabase-js instead of @supabase/supabase-js

.from().select()Same Same PostgREST chainable API

RLS policiesSamePostgres SQL policies. to authenticated, to anon and to service_role are accepted: they are aliases of aura_authenticated, aura_anon and aura_service_role (created when the project's database cluster is created; on a cluster created before this change, write the aura_* role names)

auth.uid() / auth.role()Same as claim-to-claim compatible Helpers

.rpc()SameSame signature for Postgres functions

.storage.from().upload()Same S3-compatible API, identical path

.channel().on("postgres_changes")Same Same CDC surface

Edge Functions (Deno)Same Standard Deno Runtime — Deno.serve() compatible without rewriting

Auth hooksMinor diffHTTP webhooks and dedicated endpoints

Service role keySame Same role, same scope

#
Steps

Five phases, in order

  1. Schema — apply the SQL as migrations (works today, see below)
  2. Data — insert the rows through the SDK or the REST API (works today)
  3. Auth — create the users with the admin API; passwords cannot be carried over yet (roadmap)
  4. Edge Functions — direct Deno.serve() deployment without modification
  5. Cutover — switch the URL and the keys in your app
#
Data

Schema and data: what works today

Schema. Apply your SQL as migrations. Each migration runs in one transaction; the migration API refuses BEGIN/COMMIT, dollar-quoted bodies ($$) and CREATE TRIGGER — create functions and triggers with the dedicated commands (aura db function, aura db trigger) instead.

terminalbash
# Dump the schema from Supabase (no ownership, no grants)
pg_dump "$SUPABASE_DB_URL" --schema-only --schema=public --no-owner --no-acl -f schema.sql

# Put the statements you keep in a migration, then apply it to the linked project
aura db migration new init_schema
aura db push

# Regenerate the TypeScript types
npx @aurabase/gen --out src/aurabase.types.ts

Data. Insert the rows from a script with the SDK (a single insert call accepts thousands of rows) or through the REST API, using the service_role key on a server.

Attention

Roadmap — not available. aura db restore <dump.sql> (restoring a pg_dump file, including COPY data and functions, with parallel workers) is planned and not delivered yet: the CLI does not have it today, so no timing or throughput figure is published.

#
Auth

Users and passwords

Supabase stores passwords as bcrypt hashes. Aurabase Auth stores Argon2id hashes and does not verify bcrypt hashes yet, so a Supabase password hash cannot be imported as is: your users have to set a new password, or sign in with a magic link or an OAuth provider.

scripts/migrate-users.tstypescript
// With a service_role key, on a server
import { createAdminClient } from '@aurabase/aurabase-js'

const admin = createAdminClient(process.env.NEXT_PUBLIC_AURABASE_URL!, process.env.AURABASE_SERVICE_ROLE_KEY!)

await admin.authAdmin.createUser({ email: 'ada@example.com', email_verified: true })
Attention

Roadmap — not available. aura migrate export-supabase (export of the Supabase users) and aura auth import (bulk import that keeps password hashes and MFA factors) are planned and not delivered yet. They need bcrypt hash support in Aurabase Auth first. No import figure is published until they exist.

#
Edge Functions

Native Deno — zero rewrites

Aurabase runs a standard Deno runtime. Your functions using Deno.serve() are 100% compatible without modification:

functions/hello.tstypescript
// Standard Deno function — works as is on Aurabase
Deno.serve(async (req) => {
  const { name } = await req.json()
  return new Response(
    JSON.stringify({ message: `Hello ${name}!` }),
    { headers: { 'content-type': 'application/json' } }
  )
})
Last updated · Apr 15, 2026