
Supabase
Supabase Connector Guide
This guide provides an overview of how to connect Whalesync to Supabase and answers common questions.
Connecting to Supabase
To connect your Supabase database to Whalesync, you'll need to authenticate using OAuth. This is a secure way to grant Whalesync access to your Supabase data without sharing your password. Whalesync will request access to your Supabase organization. After you select an organization, Whalesync will show you a list of your Supabase projects.
Once you select a project, Whalesync creates a dedicated read-write service account in that Supabase project. This allows Whalesync to access your data to perform syncs. The service account is granted permissions on the public
schema by default, which is where it can create and update records.
Syncing Data
Automatic Table and Field Creation
Whalesync can automatically create tables and fields in Supabase to match the structure of the other app you're syncing with.
Things to Keep in Mind
Primary Keys
For a table to be syncable, it must have a primary key that can uniquely identify each row. Whalesync will automatically detect the primary key on your table. If your table does not have a suitable primary key (e.g., an auto-incrementing number), Whalesync can add a synthetic primary key column to enable syncing.
Primary keys must be auto-generated (i.e. have a default value). To ensure data consistency, we require primary keys have default values. See Adding default values to primary keys.
Schema changes
Renaming schema, tables, or columns will break Whalesync mappings If you rename a table/column, you'll need to remap the impacted table/column in Whalesync.
Foreign Keys
We support foreign keys (including two-way sync)! In order to sync a foreign key column, you'll need to also sync the table the column references.
Permissions
The service account created by Whalesync has read and write permissions on the public
schema. If you want to sync tables in other schemas, you may need to grant permissions to the whalesync_service_account
role in your Supabase project manually.
Schema Changes
After making schema changes in Supabase, like adding or removing a column, you should refresh the schema in Whalesync to see those changes reflected.
HTML and Markdown
See HTML and Markdown Field Extensions for a way to sync HTML or Markdown into a rich text field.
Unsupported
Note that Whalesync does not yet support:
Whitelisted IP addresses
Custom SSL/TLS certificates
Supported Schemas
In general, Whalesync supports syncing custom Supabase tables. We want to prevent interfering with internal Supabase data, so we don't support syncing Postgres schemas that Supabase uses for its own internal purposes.
public
Any other non-Supabase provided schema
auth
extensions
graphql
graphql_public
pgbouncer
pgsodium
pgsodium_masks
realtime
storage
vault
Supported Fields
🏷️ Array
#️⃣ Bigint
📝 Bit
☑️ Boolean
📝 Composite
📅 Date
📅 Daterange
🔗 Domain
🔘 Enum
🖇️ Foreign Key
#️⃣ Geometric
#️⃣ Integer
#️⃣ Interval
🗃️Json
💱 Money
📝 Network
#️⃣ Numeric
⏱️ Range
📝 Text
📝 Textsearch
⏱️ Time
⏱️ Timestamp
🆔 Uuid
🗃️ XML
🔦 Binary
Last updated
Was this helpful?