Rezin Core Rezin Core
Docs

Moving in and out

Move in from Supabase

Tables, data, access rules, accounts with their passwords, and files, into a new Rezin Core project. Start at Move in in your company's sidebar and choose Supabase. The general steps and safety rules are on Move a project in.

This has been tested against dumps shaped like Supabase's and a stand-in database, not yet against a live Supabase project. The dry run shows you everything before anything is written; read it.

What you supply

Either of these for the database:

  • A dump. Made with pg_dump from your Supabase database:

`` pg_dump "postgresql://postgres.abcdefgh:[YOUR-PASSWORD]@aws-0-us-east-1.pooler.supabase.com:5432/postgres" \ --no-owner --no-privileges --schema=public --schema=auth --schema=storage -f dump.sql ``

  • The connection string. Rezin Core runs pg_dump for you, in a read-only session over an encrypted connection. It reads your public schema, and the rows of auth.users, auth.identities, storage.buckets and storage.objects. The connection string is used for this import and never stored.

And, only if you want the files themselves brought over:

  • Your project's address and service key. The list of files is in the database; the files are fetched one at a time from your project's storage with the key. Used for this import and never stored.

What comes over

On SupabaseOn Rezin Core
Tables, columns, defaults, constraints, indexes, sequences in publicThe same, in the new project's schema
Enumerated types, viewsThe same
Functions and triggers in SQL or PL/pgSQLThe same, unless security definer (refused and listed)
RowsThe same rows, identity and sequence values carried on
Row-level security policiesTranslated, shown beside the original, and held for you to put in force
auth.usersYour application's accounts, with the same IDs
bcrypt password hashesKept. Checked once at the person's first sign-in here and replaced with an Argon2 hash
Google and GitHub identitiesConnected to the same accounts
User metadata, confirmation and last sign-in timesA table in your project, imported_accounts, one row per account
Storage buckets and objectsBuckets with their public setting, size limit and allowed types; files fetched if you gave the key

Account IDs are kept, so a user_id column in your tables still matches the account it meant.

How access rules are translated

In your policyBecomes
auth.uid()core.app_user()The signed-in account's ID.
auth.role()(case when core.app_user() is null then 'anon' else 'authenticated' end)The same two answers.
to authenticatedAn added condition core.app_user() is not nullYour application has one database role here; "signed in" is a condition.
to anon, to public, or no toNo added conditionIt applied to callers who were not signed in; it still does.
public. in front of a nameThe new project's schema
auth.jwt(), auth.email()Not translatedListed with the reason. Rewrite the rule by hand.
to service_roleNot translatedHere your secret key is used by your own server. Write a rule for that if you need one.
A rule that reads storage.objects or another Supabase schemaNot translatedThat table does not exist here.

Every translation is shown beside the original with a note for each change. A rule that could not be translated is listed with the reason, and its table stays closed until you write one.

After the import each translated rule waits for you. Putting one in force creates the policy and gives your application the matching permission on that table (reading for a select rule, and so on). Use View as on the project's Access rules page to see what a caller would be given.

What does not come over

  • Edge functions. They are not in the database. Rewrite each as a function: one JavaScript module, called at its own address.
  • Database webhooks. Listed by table; recreate them on the Webhooks page.
  • Realtime. The tables in your supabase_realtime publication are listed; switch live updates on for each.
  • Extensions. uuid_generate_v4() is rewritten to the built-in gen_random_uuid(). Anything else that needs an extension is reported where it failed.
  • **Links to auth.users.** A foreign key from your table to auth.users becomes a plain column. The IDs are kept, so the values still match.
  • Accounts with no email address (phone-only or anonymous), and accounts marked deleted.
  • Accounts whose email address already has an account on Rezin Core. Listed, with most of the address hidden.
  • Supabase's own schemas (auth, storage, realtime, vault, extensions and the rest), its roles and their grants.

Passwords

Supabase stores bcrypt hashes. They are brought over as they are. The first time each person signs in here, the password they type is checked against the old hash; if it matches, it is stored again as an Argon2id hash and the old one is removed. Nobody is asked to choose a new password. Someone who signed up with Google or GitHub only has no password and signs in as before.

Switching over

The finished import shows the checklist described on Move a project in, and From their client calls to ours maps the calls your application makes.

This page as Markdown · llms.txt · Rezin Core is in development and available by invitation.