Upgrading to 0.7.0
These notes cover moving a project from engine 0.6.0 (CLI 0.3.x) to the 0.7.0 release. Read Before you upgrade first; the rest is grouped by area, and each item says what changed and what, if anything, you need to do.
Before you upgrade
- Upgrade the CLI and the engine together. 0.7.0 needs both: the CLI marks auth user ids in
the schema it sends, and the engine refuses some owner rules without that mark (see
Ownership rules).
supatype updatefetches matching versions. - On self-host, deploy the new realtime image with the engine, or before it. The first 0.7.0
push turns on
REPLICA IDENTITY FULLfor every model table (see Realtime). An older realtime image would then put the whole old row in DELETE events. The order is:supatype update,supatype self-host compose up -d, thensupatype push. - Push once. The first push from 0.7.0 records the objects 0.6.0 made as Supatype’s, with
no prompts of its own, and asks once to move pgvector,
unaccentandpgcryptoout ofpublic(see Extensions).supatype doctorlists the objects 0.6.0 made asclaimeduntil then. If someone edited a policy or RLS setting by hand under 0.6.0, the push stops withsecurity_driftinstead of overwriting it; review the difference interactively, or pass--overwrite-driftto put Supatype’s definitions back.
Version numbers
- A release engine prints
supatype-engine 0.7.0. Every other build prints a pre-release of the next minor version with the commit, so a build from the 0.7.0 source printssupatype-engine 0.8.0-dev+1a2b3c4d5e6f. The same string is stored asengine_versionon every migration row, so you can tell which build applied a change. supatype-engine capabilities(andGET /capabilitieson the engine server) reports the version and the features the binary supports. New in 0.7.0:identity_columns,migrate_record,online_ddlandpush_audit. The CLI checks features, not version numbers, and tells you to runsupatype updatewhen the engine lacks one a command needs.
Ownership rules are checked
An Owner<"field"> rule that could never match is now an error, not a policy that silently
denies everyone.
- The owner must be something that can hold the caller’s id:
"id", a relation whose key is on this model, or a field of typeUUIDorSupatypeAuthUserId. Otherwise:Model 'Post': Owner<"author"> is invalid: field 'author' is a relation that keeps its key on the other model. An owner must be "id", a relation field, or a field of type UUID or SupatypeAuthUserId. - A relation must reach a user. Owning through a relation to a model that is neither keyed by
a
SupatypeAuthUserIdnor owned itself is refused:... it reaches model 'Team', which is neither a user model (keyed by a SupatypeAuthUserId) nor owned by an Owner rule of its own, so no caller's id could ever match it.Key that model bySupatypeAuthUserId, give it an Owner rule, or own the row through a field that holds the user’s id. - Ownership is followed through one relation. A longer chain is refused (
... a chain of more than one relation, and ownership is followed through one). Own the model through a field that holds the user’s id, or own the middle model directly. - Plain UUID owners warn.
Owner<"owner_id">on a plainUUIDfield still works, with a warning:Declare 'owner_id' as SupatypeAuthUserId if it holds an auth user's id: nothing checks that it does. - Fixed: a related model with
read: Publicandupdate: Owner<"user_id">used to get a policy that never matched. It is now joined and compared onuser_id.
What to do: declare user-identity keys as SupatypeAuthUserId, shorten any ownership chain
longer than one relation, and push.
Auto-increment columns use IDENTITY
- A new table’s auto-increment column is
GENERATED BY DEFAULT AS IDENTITY. - An existing table keeps its style: a table numbered by a
serialgets serial columns, so one table is never numbered two ways. Existing serials are never converted, anddoctordoes not report them. - Declaring a field
Identityon a serial column converts it, with a warning: its default and sequence are dropped and numbering continues from the rows already there. - Removing an identity or a generation expression needs
--yesonpush.
Renames are declared, never guessed
0.6.0 paired a dropped and an added column by name similarity and renamed them without asking, which could merge two different columns. 0.7.0 only renames what you declare. An undeclared drop plus add is a drop and an add, and needs your consent like any other destructive change.
- Record a rename with
supatype rename member.name member.title(a column) orsupatype rename member members(a table). It is written tosupatype/renames.json; commit that file. - In a terminal,
supatype devandsupatype pushask once, before the “drop the data?” question:Was member.name renamed to member.title? (recorded in supatype/renames.json). A yes records it and the push runs again. - Off a terminal (CI), the push is refused and prints the
supatype rename ...lines to run. - Every push replays the journal, so a staging or production database still on the old name
renames rather than drops.
supatype rename --pruneremoves the entries a database’s history records as applied.
Who pushed what
Each migration row now records pushed_by, pushed_via (cli, studio, cloud or
self-host), pushed_from (a CI run URL or the host name), whether the identity was verified,
and the renames it applied. The CLI sends your git Name <email> (unverified); self-host and
Cloud record the authenticated identity. supatype migrations list and Studio’s migration history
show them. The columns are added to _supatype.migrations on the first push.
Pushes wait less and lock less
- Lock waits: a push waits at most 3 seconds for each table lock, and retries up to 4 times
with a growing pause, so it gives up within about 25 seconds. 0.6.0 set no lock timeout and
waited for as long as the lock was held. When it gives up, nothing is applied and the message
names the session holding the lock:
The push could not take AccessExclusiveLock on post in 4 attempts, each waiting 3s, and nothing was applied. It is held by pid 4242 .... The first bootstrap retries the same way; adopt, rebaseline and rollback try once. - Online changes on tables with rows: new indexes are built
CONCURRENTLYafter the migration commits; new foreign keys and checks are addedNOT VALIDand validated afterwards;SET NOT NULLand new unique constraints no longer scan or build under an exclusive lock. Unchanged policies, triggers and views are no longer recreated on every push. If a step after the commit fails, the push reportsvalidation_failedwith the steps, anddoctorshows them as pending. - Large rewrites ask first: a change that rewrites or scans a table of more than 100,000 rows
is refused off a terminal until you pass
--yes, because it blocks reads and writes on that table until the push commits. - Refusals have stable reasons. The engine answers HTTP 409 (or prints
{"status":"refused","reason":...}) withlock_unavailable,validation_failed,engine_busy,security_driftand others, so scripts can branch on the reason. supatype migratenow writes the SQL a push would run without applying or recording it.supatype migrate --recordwrites a file that records history as a push does.
Realtime
- DELETE events respect read rules. Realtime judges a DELETE against the whole deleted row and delivers it only to subscribers who could read that row. 0.6.0 delivered every DELETE, with the row’s key, to anyone subscribed to the table.
REPLICA IDENTITY FULL. To give realtime the whole deleted row, every push setsREPLICA IDENTITY FULLon each model and junction table it manages. Tables Supatype does not manage are left alone. If you set a table back by hand,doctorreports it and the next push restores it. Without FULL, realtime sends no DELETE events for a table with read rules, rather than guess.- Deploy order: see Before you upgrade. The realtime image must be the 0.7.0 one before the first push.
- Supatype Cloud free tier: realtime is now on for Free projects, at the plan’s concurrent connection limit (see the pricing page).
WAL volume
With REPLICA IDENTITY FULL, every UPDATE and DELETE on a model table writes the whole old
row to the write-ahead log, not only its key. Inserts are unaffected. On write-heavy tables with
wide rows, expect noticeably more WAL: more disk, more replication traffic, larger base backups
and WAL archives. A slow realtime consumer also reaches the replication slot’s retention limit
sooner (max_slot_wal_keep_size, 4 GB in the supatype/postgres image). Realtime needs
wal_level = logical; the image sets it, and the CLI’s database check tells you how to set it on
your own Postgres.
Field rules on INSERT
Field write rules (access.fields) are now judged on INSERT against the row being stored, defaults
included, as Postgres RLS WITH CHECK does. 0.6.0 judged them against a row of NULLs, so a rule
that reads the row (Owner<"id">, OwnerFrom, a membership) never passed on create and the value
was silently replaced by the column default: a user creating their own row could not set their own
owner-only field. Now an owner_id DEFAULT auth.uid(), a gen_random_uuid() key or a serial key is
what the rule reads.
| The caller sends | What happens |
|---|---|
| A value the rule allows | It is stored. |
| A value the rule refuses, other than the column’s default | The insert fails with 42501: permission denied for column <column> of relation <table> with masking in views (tier 2), column "<table>"."<column>" cannot be written by this role with masking in the database (tier 1). It used to succeed and drop the value. |
Nothing, DEFAULT, NULL, or the column default’s own value | The column takes its default, and the rule is not judged. |
The default’s own value counts as no write, because PostgREST’s Prefer: missing=default sends it
for a key a row leaves out. So an admin-only verified with DEFAULT false is accepted from anyone
when it is left out or sent as false, and verified: true from a non-admin is refused. A volatile
default (gen_random_uuid(), a sequence) never equals a value sent.
UPDATE is unchanged. A field the caller cannot read keeps its stored value whatever is sent, and the
same value sent back is kept; a real change is judged by the write rule and refused with 42501 if
it is not allowed.
What changes for an existing project:
- Clients that sent a value they could not write on create, and relied on it being dropped, now
get an error, unless the value is the column’s default. Leave the field out, or send
NULL. - Tier 2 (the
apiviews): the next push rewrites each masked view’s write trigger. - Tier 1 (
supatype_mask): the behaviour comes with the newsupatype/postgresimage; restarting Postgres on it is enough. - Column privileges: the push no longer takes
INSERTaway fromauthenticatedon a column whose write rule reads the row. Until that push, an insert naming such a column is refused. supatype diffno longer refuses a required column without a default whose write rule reads the row. It still refuses one whose write rule denies everyone.- The service role is exempt from field rules. When it sends
NULLfor a masked column that has a default, tier 2 stores the default and tier 1 stores theNULL. - A
BEFORE INSERTtrigger on the table runs after the rules are judged, so a rule does not see what such a trigger changes.
Auth providers in dev and self-host
OAuth providers can now be declared in supatype.config.ts. supatype dev and
supatype self-host compose turn them into the SUPATYPE_EXTERNAL_<PROVIDER>_* variables the auth
server reads, with the redirect URI filled in:
// docs:no-check (a fragment: the rest of your config stays as it is)import { defineConfig, env } from "@supatype/cli"
export default defineConfig({ auth: { providers: { github: { clientId: "Iv1.0123456789abcdef", secret: env("GITHUB_SECRET") }, }, },})- Secrets must be
env("NAME"), with the value in.env. A literal secret is rejected, because the config is committed and the compose file names the variable rather than holding the value. - The redirect URI defaults to your public API URL followed by
/auth/v1/callback. Register the same URL with the provider; setredirectUrionly when the public URL differs. .envwins over the config. For a provider listed underauth.providers, aSUPATYPE_EXTERNAL_<PROVIDER>_*value already in.envoverrides what the config would write.- A provider configured only in
.envmust move to the config on a Docker stack. The compose file passes the server only the providersauth.providerslists, so a provider that exists only as.envvariables is not enabled undersupatype devwith Docker orsupatype self-host compose. Nativesupatype devstill reads it from.env, with no default redirect URI: set its ownSUPATYPE_EXTERNAL_<PROVIDER>_REDIRECT_URIto<API URL>/auth/v1/callback, or the provider sends users back to a path that answers 404. supatype devandsupatype self-host composewarn when an enabled provider’s secret is set nowhere.
Framework bindings and realtime status
- Vue, Svelte and Solid: a subscription’s status now follows the socket. When signing in or out
swaps the realtime socket, the status reads
connectinguntil the new socket accepts the join, where it used to readconnectedthroughout. A reconnect that gives up now readserror, and the error clears when a later reconnect succeeds. Each subscription gets its own channel, so two components watching the same table no longer share one. @supatype/client/bindingsis a new subpath the framework bindings use internally. It is not a public API; do not import it from application code.
Extensions move to the extensions schema
A push now creates the extensions a schema needs (postgis for Geo and GeoPoint, vector for
Vector<N>, unaccent for slugs, pgcrypto) in the extensions schema, as Supabase does, instead
of public. In public, PostGIS and pgvector added about 940 functions, about 330 of which the API
served as /rest/v1/rpc/* endpoints and listed in a 328 KB OpenAPI document. PostgREST 14 lists
those functions with a query that is slow while the catalog statistics are older than the
extension, so GET /rest/v1/ timed out for 30 to 60 seconds after the push that created them.
What you get:
Geo,GeoPointandVectorcolumns read, write and filter through REST and GraphQL as before. PostgREST resolves their types and operators through its extra search path, which ispublic,extensions(orapi,extensionswith field masking in views) on every tier.- The extensions’ own functions are no longer API endpoints:
/rest/v1/rpc/st_distanceanswers 404. To call one from the API, write a SQL function of your own inpublicthat calls it, and call that withrpc(). - A model index can name its method:
{ fields: ["location"], using: "gist" }for aGeoorGeoPointfield,{ fields: ["embedding"], using: "hnsw" }for aVectorfield. Anhnswindex uses cosine distance (vector_cosine_ops); adddistance: "l2"ordistance: "innerProduct"for the other two. A query ordered by a different distance than its index’s does not use the index.hnswindexes used to fail to push, because pgvector needs the operator class named.
Existing projects. The first push after you upgrade moves vector, unaccent and pgcrypto
out of public with ALTER EXTENSION ... SET SCHEMA extensions. Columns, indexes and rows are not
touched: a column records its type by OID, not by name. The move is listed in the plan as a
cautious change, so supatype push asks before applying it (--yes agrees up front) and
supatype dev applies it as it applies other cautious changes. It is recorded in the migration
history, and supatype rollback moves the extensions back. SQL of your own that qualifies one of
their objects with public. (public.vector, public.unaccent(...)) has to drop the prefix or use
extensions., and a database role with its own search_path needs extensions on it.
PostGIS stays where it is. ALTER EXTENSION postgis SET SCHEMA is not supported, so a push
leaves PostGIS in public, says so in a warning on each push, and everything keeps working. To
move it, reload the PostGIS columns. This drops and re-adds every geography and geometry
column, so do it in a maintenance window with writes stopped, after a backup
(with pg_dump, for example). Run the SQL as the database’s admin role
(supatype_admin on supatype/postgres):
-
List the columns to keep:
SELECT table_schema, table_name, column_nameFROM information_schema.columnsWHERE udt_name IN ('geography', 'geometry'); -
Copy each one aside with its table’s primary key, as text (the hex form reads back exactly), then replace the extension. Repeat the
CREATE TABLEfor every column the query listed. TheDROPalso takes the columns’ indexes, any view or policy that uses them and thespatial_ref_systable; copy any rows you added tospatial_ref_sysyourself, and droppostgis_topologyorpostgis_rasterfirst if you installed them.CREATE SCHEMA postgis_move;CREATE TABLE postgis_move.places AS SELECT id, point::text AS point FROM public.places;DROP EXTENSION postgis CASCADE;CREATE EXTENSION postgis WITH SCHEMA extensions; -
Push. The push adds the columns and their indexes back, empty:
supatype push. -
Put the values back, and drop the copies:
UPDATE public.places AS t SET point = m.point::extensions.geographyFROM postgis_move.places AS m WHERE t.id = m.id;DROP SCHEMA postgis_move CASCADE; -
Push again. It reports the schema up to date, and the warning about PostGIS is gone.
Functions and the database
Edge functions on self-host now run on their own network with only the gateway and the Supatype server, so a function can no longer reach the database, storage or other internal services directly. Call them through the API.
Direct database access is an opt-in: set SUPATYPE_FUNCTIONS_DB_URL to a connection string for
the stack’s db and re-render compose (supatype self-host compose up -d); functions receive it
as ctx.dbUrl. It connects as whatever role the URL names: row rules and field masking apply for that
role, and a superuser or BYPASSRLS role skips both. Use a least-privilege login role, never the admin URL. See
the functions worker README.
Native Postgres checks passwords
supatype devwithprovider: "native"(andsupatype pg start) used to initialise Postgres with--auth trust, so any local process could connect as any role, the superuser included, with any password or none. New data directories usescram-sha-256for local and host connections, with.env’sPOSTGRES_PASSWORDfor the superuser andAUTHENTICATOR_PASSWORDfor PostgREST’s role. Either is generated and written to.envwhen missing.- Nothing to do for an existing native data directory. The first start under 0.7.0 gives the
superuser
.env’s password, rewritespg_hba.conffromtrusttoscram-sha-256, and says so: “This Postgres trusted every local connection; it now checks passwords.” - Tools that connected without a password now need
.env’sPOSTGRES_PASSWORD(forpsql,PGPASSWORD).supatype pg psqlpasses it for you.
Client changes
- Writes take every filter.
update()anddelete()accept the same filters asselect()(gt,like,or,is,matchand the rest), so a ranged or patterned write no longer needs the ids read first.delete().select()now returns the deleted rows. - Arrays in
containsandcontainedBy. An array is sent as a Postgres array literal, so filtering an array column works; a string is sent as written (range types), anything else as JSON (jsonb).in()quotes values that hold a comma or parenthesis. countisnullunless you asked for one (count: "exact"and the others). It used to beNaNon every ordinary query.- Timeouts and retries. The configured
timeoutnow covers every request, tables, auth and storage included. OnlyGETandHEADrequests (and storage reads sent asPOST, such aslistand signed URLs) are retried. Writes, sign-in, uploads andrpc,graphqlandfunctions.invokecalls are sent once, because a request that failed in flight may already have been applied; passidempotent: truetorpc,graphqlorfunctions.invokefor a call that is safe to repeat. - Auth errors keep their code. Every auth call’s
error.codenow carries the auth server’s code (invalid_credentials,weak_password,otp_expiredand the rest).updateUseremitsUSER_UPDATEDand updates the session’s user; a session from a recovery link emitsPASSWORD_RECOVERYafterSIGNED_IN. - Error codes follow PostgREST 14: an expired token is
PGRST303, a missing tablePGRST205, a database error arrives under its own SQLSTATE (23505,42501), and.single()without exactly one row answersPGRST116on reads and writes alike. Code that compared against the old constants should use the client’s error code constants. headersmay be a function, called for each request.
PostgREST 14
Every stack now runs PostgREST 14.18 (compose and native dev used 12.2.x).
- The JWT secret must be at least 32 characters. PostgREST 13 and later refuse a shorter one at
startup, so
supatype devandsupatype self-host compose upnow stop first and say how to make a longer one and re-sign the keys. Secrets the CLI generates already pass. If yours is shorter, replaceJWT_SECRETin.env(for exampleopenssl rand -base64 48) and runsupatype keys --write --forceto re-signANON_KEYandSERVICE_ROLE_KEY. - An update or delete filtered with
or()orand(), with aselectthat leaves out the filtered column, now works. On 12.x it answered “column … does not exist” and rolled back. - REST before the first push answers
503(PGRST002): PostgREST will not serve until the schemas it exposes exist. A push to a compose or self-host stack now waits, up to 40 seconds, until REST answers, printing one line while it does.
Studio roles
Studio has one role set on both hosts: owner, admin, developer, editor, billing and viewer.
Self-host projects use admin, developer, editor and viewer; owner and billing are Supatype Cloud
organisation roles. On Cloud, the organisation role member is now developer. Existing
members and invitations are migrated; scripts that send role: "member" must send developer.
| Role | What it may do |
|---|---|
| owner | Everything, including the organisation itself |
| admin | Everything a developer may do, plus granting Studio roles; on Cloud, organisation settings, billing and deleting projects |
| developer | Read and write content, view the schema, push, deploy, use the SQL editor, inspect realtime, read logs, and manage keys, domains, allowed origins, project users and buckets |
| editor | Read and write content |
| billing | Billing and usage only (Cloud) |
| viewer | Read content and the schema, and read logs; changes nothing |
- Organisation roles apply to every project in the organisation. A per-project role can only narrow what the organisation role gives, never widen it, and an owner is never narrowed.
- How Studio acts for you. Owners, admins and developers act elevated (as the service role) by default, visibly and recorded. Editors and viewers act as Studio: their Studio role decides what they may do with content, so the project’s row rules do not apply to them, while its field rules, masking included, do. Any role can switch to act as themselves, so the project’s own row rules apply and Studio shows what the application would.
- Linking your Cloud login to a project user. On Cloud, a member acting as themselves acts as their linked project user. Studio asks a member with no link to sign in once with their login for the project; that sign-in is the proof, and the link is stored. A member with no link is refused project data rather than shown everything.
- The SQL editor and Database write controls are for owners, admins and developers. The SQL editor runs with the rights of the project’s owning role, so row level security does not apply to it (see The SQL editor’s connection). Studio hides the Database screens’ create, drop and policy controls from other roles; viewers still read the Database views, policies and migration history through a read-only metadata catalogue.
- Sessions in the Users view are listed and revoked through the auth admin API.
The SQL editor’s connection
Studio’s SQL editor no longer connects as the database’s superuser. It logs in as
supatype_sql_editor, a role that is not a superuser, holds the rights of the role that owns the
project’s data, and cannot switch into that role. SQL typed into the editor therefore cannot regain
superuser rights. The editor still sees masked columns unmasked, as it did before, and objects it
creates are handed to the owning role in the same transaction.
The role’s password is its own: SUPATYPE_SQL_EDITOR_PASSWORD in .env, kept apart from
POSTGRES_PASSWORD.
-
New projects:
supatype initgenerates the password. -
supatype dev: adds a local password to.envwhen it is missing, and sets the role’s password from.enveach time it starts the stack. -
Self-host: add
SUPATYPE_SQL_EDITOR_PASSWORDto.envbeforesupatype self-host compose up -d. The generated compose file requires it and stops withSUPATYPE_SQL_EDITOR_PASSWORD is missing from .envwithout it. Thesupatype/postgresimage sets the role’s password from it when it creates a database. For a database created by an older image, the role is created on the next start without a password, so set it once yourself, assupatype_admin:ALTER ROLE supatype_sql_editor WITH LOGIN PASSWORD '<SUPATYPE_SQL_EDITOR_PASSWORD>';
Allowed origins (CORS)
Outside dev mode, the gateway now decides CORS for every service behind it. 0.6.0 allowed every origin on a production server unless you set a list.
- Allowed by default: the origin of
SITE_URL, plus the origins inapi.corsOriginsinsupatype.config.tsand inSUPATYPE_CORS_ALLOW_ORIGINSin.env. - Studio’s Settings > CORS page lets owners, admins and developers save a list, kept in the database, which replaces the default until it is reset. The site URL stays allowed whatever is saved.
*allows every origin, and only when you write it. Any other origin’s preflight is refused with403.supatype devis unchanged.- On Supatype Cloud,
api.corsOriginsis not used: set the list on Studio’s Settings > CORS page.
If your app is served from an origin other than SITE_URL, add it to api.corsOrigins before you
upgrade a production server.
Foreign keys and recreated columns
onUpdateon a relation is honoured. It used to be ignored, and every foreign key wasON UPDATE CASCADE. Left out, it is stillCASCADE, so existing projects see no change.- A column the push drops and adds again keeps its dependents. Every index, constraint, trigger, policy and view on it is dropped first and made again from its own definition, enabled state included. A view or object in another schema that is not Supatype’s makes the push refuse before any change, naming each one.
Auth server
- Email templates saved from Studio are kept in the database and survive restarts and replicas;
a saved template wins over
SUPATYPE_MAILER_TEMPLATES_*. Studio shows when a saved edit is in force and can reset it to the configured or built-in template. - GraphQL runs as the caller, so row level security applies to it on every host.
- Custom OAuth providers’ callbacks live under
/auth/v1, like the built-in providers’. If you registered a custom provider’s callback as<API URL>/callback, register<API URL>/auth/v1/callbackwith the provider instead. - Studio’s auth Configuration page is read-only and shows where each setting comes from.
CLI
--project-nameorSUPATYPE_PROJECT_NAMErenames the project for one run (its compose project, database and state directory follow) without changing any file.supatype self-host compose restart <service>recreates one service with the current config and.env. The generated compose file names its folders by absolute path and its compose project by name, so a hand-rundocker compose -f .supatype/self-host/docker-compose.ymlreaches the same stack.- The compose file follows the stack’s mode: dev while a
supatype devsession holds the project, otherwise the mode the running server is in, otherwise standalone. A push to a stack started withself-host compose upno longer recreates it in dev mode. A dev lock left by a killedsupatype devis ignored. supatype devstops when the process that started it exits, as it does on Ctrl+C, so a killed script or a cancelled CI job leaves nothing running. To leave a stack running with nothing attached, usesupatype self-host compose up -d.- The engine’s licence is saved beside a downloaded engine, and the CLI prints once:
[supatype] Supatype engine is licensed under BUSL-1.1; see <path>.
Supatype Cloud
- Realtime is on for every plan, Free included, each at its plan’s connection limit.
- Plan limits come from one source. The pricing page, Studio and the control plane read the same definitions, and limits are enforced by the organisation’s plan, counted across the organisation.
- Three environments (production, staging and preview) on every paid plan.
- Resetting an environment’s database password now changes it everywhere it is held and ends the old sessions.
Configuration checks
- Schema names in
schema.pg_schemaandschema.api_schemasmust be plain identifiers (^[a-z_][a-z0-9_]*$, at most 63 bytes). The CLI refuses others when it reads the config. doctor --rebaselinetakes--accept-access-drift(renamed);--overwrite-driftis forpushonly.- Generated rules read the JWT through
_supatype.jwt_*functions. A custom database role that runs queries needsUSAGEon schema_supatype, and hand-written policies should use the same readers. - With field masking in views (tier 2), the views are owned by one role per database
(
supatype_api_owner_<hash>). The old sharedsupatype_api_ownerrole is left in place for you to drop once no database uses it.
Licence
The schema engine is now licensed under the Business Source License 1.1, with an Additional Use
Grant that allows production use except offering a competing hosted service or product, and each
version becomes Apache 2.0 four years after its release. supatype-engine licence prints the
terms. The engine’s unused --license <key> flag is removed; a script that passes it now fails
with an “unexpected argument” error. The CLI, client libraries and services keep their MIT and
Apache 2.0 licences. See the licensing page.