# Moving from Supabase or Vercel

An app built on Supabase or Vercel moves here with few code changes. Each step below says what runs as it is and what to check. Do them in this order.

## 1. Make the project and link the folder

`create_project` (region is chosen once, see blackwall://start), then in the app folder `oneend login --token <token>` and `oneend link --project <ref>` (blackwall://cli).

## 2. Move the database

`oneend db pull` writes the current schema as the first migration; apply versioned SQL with `oneend db push` (blackwall://migrations).
SQL written for Supabase runs as it is: `public.`, `auth.` and `storage.` and the roles `anon`, `authenticated` and `service_role` are translated, and the answer's `translated` says what was replaced (blackwall://access-rules).
Custom schemas, `pg_cron`, `pg_net` and Vault work too (blackwall://database-features). There is no synchronous `http` extension: use `net.http_get` or a function.
**Check after moving:** list_policies shows the project's real role names; a table that looks empty is almost always its access rules (blackwall://access-rules).

## 3. Keep supabase-js

Point it at `https://<ref>.<zone>` with the publishable key. `SUPABASE_URL`, `SUPABASE_ANON_KEY` and `SUPABASE_SERVICE_ROLE_KEY` (and the `NEXT_PUBLIC_` forms) are already set in builds and functions, so `createClient(Deno.env.get('SUPABASE_URL')!, ...)` needs no edit (blackwall://env).
`generate_typescript_types` makes the `Database` type (blackwall://migrations).

## 4. Sign-in and files

Providers, redirect addresses and `custom:<name>` OAuth providers: blackwall://auth. Buckets, signed URLs and S3-compatible access: blackwall://storage.

## 5. Functions

Deno functions written for Supabase run as they are: `Deno.serve`, `npm:` imports, a `_shared` folder, the caller's `Authorization` header. Deploy a folder with `oneend functions deploy <name> <folder>` (blackwall://functions).
A call may take 150 seconds by default, as on Supabase.

## 6. Deploy the site

Push to git or run the deploy tools (blackwall://deploy). Domains, redirects and preview protection: blackwall://domains and blackwall://previews.
Apps that use `@vercel/analytics` and `@vercel/speed-insights` are counted with no code change; custom `track` events are not kept yet (blackwall://edge).

## Not the same

- A direct connection (psql) is not name-translated; use the names `app_<ref>` shows.
- The data API answers for public only until you expose more schemas.
- Anything not listed here is not promised. Check the page for it before relying on it.

---

https://end.blackall.ai/docs/switch?lang=en
