Migrate supabase from v2 to v3
The full migration guide is in
references/migration-v2-v3.md. Its section
headings name the symbol that changed, so search it for the symbol in a
compiler error or in the code you are changing. Every "Before" and "After"
snippet there is authoritative. This file is the order to apply it in and the
checks that make the migration complete.
Rules
- Follow the steps in order. Do not skip the Supabase CLI check.
- Never write the table definitions by hand. They come from
supabase gen types --lang dart, and the generated file is never edited.
- Every query ends up on the typed
table() API unless it matches one of the
exceptions in step 8. Report every exception to the user.
- Keep the behavior of the app. Where v3 changed a default, pin the v2
behavior explicitly unless the user asks for the new one.
- Do not suppress analyzer errors or warnings to get a clean run. Fix them.
- Ask the user before a choice that changes runtime behavior and is not
covered here.
1. Preflight
- Read
pubspec.yaml. Note which of these are dependencies and their
versions: supabase_flutter, supabase, gotrue, postgrest,
realtime_client, storage_client, functions_client.
- Run
git status. If the tree is dirty, ask the user to commit or stash
first so the migration is one reviewable diff.
- Run
dart analyze and save the output. Issues that exist before the
migration are the baseline, and step 9 is measured against it.
- Check for a
supabase/ folder with config.toml and migrations/. It
decides the source of the generated types in step 4.
2. Supabase CLI 3.0.0 or newer
Dart generation requires Supabase CLI 3.0.0 or newer.
supabase --version
If the project runs the CLI through npm (a supabase entry in
package.json), check npx supabase --version instead.
If the command is missing or prints a version below 3.0.0, stop and give
the user the command for their platform, then wait until the version check
passes:
Do not continue on an older CLI and do not fall back to hand-written types.
3. Pin the changed order() defaults while still on v2
v3 changed two defaults of order() without a compile error. Both pins
below already mean the same thing on v2, so add them before upgrading:
grep -rnE '\.order\(' lib test bin
- A call without
ascending: sorted descending on v2 and sorts ascending on
v3. Add ascending: false.
- A query that sorts descending (including the ones you just changed) put
NULLs last on v2 and puts them first on v3. When the column is nullable,
add nullsFirst: false. This does not apply to stream().order(), which
takes no null placement.
The direction pin applies to stream().order() too. The result is that every
order() call states its direction and, on a descending query of a nullable
column, its null placement.
4. Dependencies and the typed schema
Once supabase_typegen is added, its supabase-typegen-generate skill has
the details of the generator, its options and its errors.
Update the dependencies. Use the newest 3.x version of each package;
dart pub outdated lists it, prereleases included.
supabase to 3.x.
Replace any direct dependency on a renamed package, and its imports:
| v2 |
v3 |
gotrue |
supabase_auth |
realtime_client |
supabase_realtime |
storage_client |
supabase_storage |
functions_client |
supabase_functions |
A direct dependency that only duplicates what supabase already
re-exports can be removed instead.
Add the generator: dart pub add dev:supabase_typegen.
Run dart pub get.
Generate the schema. Pick the source:
- A
supabase/ folder with migrations: run supabase start (needs Docker),
then supabase gen types --lang dart.
- A project linked with
supabase link: --remote.
- Otherwise ask the user for the project ref and use
--remote=<ref>.
Ask which schemas the app queries. Pass --schema for each schema other
than public that the app uses. Write to lib/supabase_schema.g.dart
unless the project already has a generated-code convention:
supabase gen types --lang dart > lib/supabase_schema.g.dart
Run dart analyze lib/supabase_schema.g.dart. It must be clean. If it is
not, report the error to the user rather than editing the file.
5. Mechanical renames
Apply these across the project before reading compiler errors, since they
remove most of them. The tables are in the reference:
- "The client packages are renamed": imports and the
GoTrue* type names,
such as GoTrueClient to AuthClient.
- "Abbreviations in the public API are spelled out": for example
queryParams: to queryParameters: and opts: to options:.
- "Plural enum names singularized" and "One shared
SortDirection for every
sort direction".
- "Every deprecated API is gone": for example
User.confirmedAt to
User.emailConfirmedAt and AuthUser to User.
6. Compiler-driven pass
- Run
dart analyze.
- For each new error, search the reference for the symbol it names and apply
the "After" form of that section.
- Repeat until the only issues left are the baseline from step 1.
The sections that most often apply:
- "Sign-in methods that always issue a session return the
Session":
signInWithPassword() and others return the Session directly.
- "
AuthState is a sealed class" and
"User.appMetadata is an AppMetadata and userMetadata is never null".
- "Realtime listener callbacks are now streams":
onPostgresChanges,
onBroadcast and the connection callbacks.
- "The auth client persists the session itself":
localStorage: and
LocalStorage subclasses become an AuthAsyncStorage.
- "Service exceptions share one base" and "
FunctionsException is sealed".
- "Every client takes one
SupabaseRetryOptions".
- "Timestamps are
DateTime instead of String or int".
- "
rpc is a getter", "insert() and upsert() no longer take filters" and
"The rest client and its builders are stateless".
7. Changes the compiler will not catch
Go through every item. For each one, search with the given pattern, read
every match, and fix or confirm it. Keep a list of the sites you could not
decide for the summary in step 9.
| Change (reference section) |
Search |
Action |
order() defaults |
\.order\( |
Confirm step 3 covered every call. |
RealtimeClient.connectionState is now typed |
connectionState |
Compare against SocketState.open and friends, not strings. Prefer isConnected. |
HttpMethod is one shared enum |
HttpMethod\.[a-z]+\.index |
Persist name instead of index. |
Confirming an email or phone change emits userUpdated |
AuthChangeEvent\.signedIn |
Handle userUpdated where an email or phone change confirmation should be seen. |
AuthChangeEvent.initialSession is emitted to every subscriber |
onAuthStateChange |
Listeners that act on signedIn at subscription time must also act on initialSession. |
A client without an asyncStorage keeps pkce verifiers in memory |
SupabaseClient\( |
A directly constructed client whose pkce flow completes in another process, such as from an email link, passes a persistent AuthClientOptions(asyncStorage: …). |
| The retry backoff defaults are the same in every client |
retryOptions|SupabaseRetryOptions |
Ask whether the old PostgREST curve matters. If it does, pass the options shown in the reference. |
| The rest client and its builders are stateless |
=\s*await .*\.(insert|upsert|update|delete)\( |
A write without select() resolves to void. Drop the assignment or add .select(). |
userMetadata is never null |
userMetadata\s*(\?|==|!=) |
Remove the dead null checks. |
PostgresChangePayload.errors is a List<String> |
errors\s*[!=]=\s*null |
Replace != null with errors.isNotEmpty and == null with errors.isEmpty. |
SupabaseClient builds its own default HTTP client |
runWithClient |
Pass the client as httpClient: instead. |
The Supabase URL must use https |
SupabaseClient\(|Supabase\.initialize |
Trace the URL of each call, including one from String.fromEnvironment. Use https unless the host is loopback, or pass allowInsecureHttp. |
| A request that gets no response throws a transport exception |
on ClientException|on TimeoutException |
Catch SupabaseTransportException around Supabase calls. |
A failing accessToken callback throws AccessTokenException |
accessToken: and transport exception catches |
Catch AccessTokenException where token failures were handled. |
| The request timeout bounds idle time |
requestTimeout |
Add .timeout(…) on the builder where a total deadline was intended. |
| Realtime throws exceptions instead of strings |
on String|toString\(\)\.contains near subscribe, httpSend, track, send |
Catch StateError, RealtimeApiException or RealtimeTransportException. |
| Signing out removes every channel |
\.subscribe\( |
Subscribe a channel that must outlive a sign-out, such as a public one, again after AuthSignedOut. |
| Cross-tab session sync is opt-in for standalone clients |
AuthClientOptions\( |
On web, pass persistSession: true where the session must be shared and persisted. |
Search lib, test, bin and any other source folders with
grep -rnE '<pattern>'.
8. Move every query to the typed table() API
Follow the reference section "Moving from from() to the typed table API".
Convert one table at a time and re-run dart analyze after each.
Naming in the generated file: table books in public is Books,
BooksRow, BooksInsert and BooksUpdate. A table in another schema
carries the schema as a prefix, inventory.books is InventoryBooks, and
supabase.schema('inventory').from('books') becomes
supabase.table(InventoryBooks.table). Columns are camelCase constants on the
table class, Books.authorId.
| Untyped |
Typed |
.from('books').select() |
.table(Books.table).select() |
.select('id, title') |
.selectOnly([Books.id, Books.title]), read with row.title |
.select('title, authors(name)') |
.selectOnly([Books.title, Books.authors(Authors.name)]) |
.eq('author_id', 2) |
.where(Books.authorId.eq(2)) |
.or('price.lt.10,in_print.eq.false') |
.where(Books.price.lt(10) | Books.inPrint.isFalse()) |
.order('created_at', ascending: false) |
.order(Books.createdAt.desc()) |
.order('price', ascending: false, nullsFirst: false) |
.order(Books.price.desc().nullsLast()) |
.limit(3, referencedTable: 'books') |
.embedded(Authors.books, (books) => books.limit(3)) |
.eq('books.title', 'Dune') |
.embedded(Authors.books, (books) => books.where(Books.title.eq('Dune'))) |
.select('name, books!inner(title)') |
.selectOnly([...]).requiring(Authors.books) |
.isFilter('books', null) |
.where(Authors.books.isNull()) |
.insert({...}) |
.insert(BooksInsert(...)) |
.insert([{...}, {...}]) |
.insertAll([BooksInsert(...), ...]) |
.update({...}).eq('id', 1) |
.update(BooksUpdate(...)).where(Books.id.eq(1)) |
.update({'price': null}) |
.update(BooksUpdate(price: null)) |
.delete().eq('id', 1) |
.delete().where(Books.id.eq(1)) |
.delete() with no filter |
.delete().all() |
.upsert({...}, onConflict: 'name') |
.upsert(AuthorsInsert(...), onConflict: [Authors.name]) |
.stream(primaryKey: ['id']).eq('author_id', 2) |
.stream(primaryKey: [Books.id]).filter(Books.authorId.eq(2)) |
.rpc('search_books', params: {'query': q}) |
.rpc.searchBooks(query: q) |
Rules for the conversion:
- Carry the direction pinned in step 3 over:
ascending: false becomes
.desc(), and nullsFirst: false becomes .nullsLast(). An order() with
neither stays a plain column, which is ascending. A typed stream() takes
the same orderings, but throws an ArgumentError on .nullsFirst() or
.nullsLast(), since it always places NULLs last ascending and first
descending.
- A typed
update() or delete() sends nothing until it has .where(…) or
.all(). A bare await of one compiles and silently does nothing, and the
analyzer reports it as an unused_result warning. Fix every one of them.
- A parameter of an
Insert or Update type that is left out leaves the
column out, and passing null writes SQL NULL, the same as a key that is
missing from the map or set to null.
insertAll() and upsertAll() give a column left out of only some rows its
database default, where the untyped list insert() wrote NULL, and take
no defaultToNull. Where the code relied on NULL, pass null for the
column in those rows.
- Replace
row['title'] as String with row.title wherever the rows are
consumed. A model class that only mirrors a table is replaced by the
generated row type. A model that adds behavior is built from the row
getters, not from toJson().
- An operator with no typed method uses
Books.title.raw('eq.Dune'). A filter
on a JSON path uses Books.metadata.jsonText('edition').eq('first').
from() and the untyped rpc('fn', params: …) remain only for:
- a table, view or function missing from the generated file because its
schema was not generated or is not exposed through the Data API,
- a table name computed at runtime,
- a function the generator gives no method, which it explains in a comment in
the generated file.
9. Verify and report
dart analyze shows nothing beyond the baseline from step 1.
- Run
dart format on every file you changed. Do not format
lib/supabase_schema.g.dart, which is already formatted.
- Run
dart test. Fix failures the migration caused and report the rest.
- Give the user a short summary:
- the dependency changes and the generated schema file and command,
- every site from step 7 that needs a human decision,
- every remaining
from() or untyped rpc() call and its reason,
- that the schema must be regenerated with the same command after every
change to the database schema, whether from a migration or the
dashboard, and after upgrading
supabase_typegen or the Supabase CLI.
1---2name: supabase-migrate-v33description: >-4 Migrates a Dart or Flutter project from supabase v2 to v3, including the5 renamed gotrue, realtime_client, storage_client and functions_client6 packages. Generates a typed database schema with the Supabase CLI, applies7 every breaking change from the migration guide, and moves queries from the8 untyped from() API to the typed table() API. Use when the user asks to9 upgrade or migrate Supabase to v3, bumps supabase to ^3, or hits v310 breaking changes.11metadata:12 source: https://skillmd.com/skills/supabase/supabase-migrate-v313---1415# Migrate supabase from v2 to v31617The full migration guide is in18[references/migration-v2-v3.md](references/migration-v2-v3.md). Its section19headings name the symbol that changed, so search it for the symbol in a20compiler error or in the code you are changing. Every "Before" and "After"21snippet there is authoritative. This file is the order to apply it in and the22checks that make the migration complete.2324## Rules2526- Follow the steps in order. Do not skip the Supabase CLI check.27- Never write the table definitions by hand. They come from28 `supabase gen types --lang dart`, and the generated file is never edited.29- Every query ends up on the typed `table()` API unless it matches one of the30 exceptions in step 8. Report every exception to the user.31- Keep the behavior of the app. Where v3 changed a default, pin the v232 behavior explicitly unless the user asks for the new one.33- Do not suppress analyzer errors or warnings to get a clean run. Fix them.34- Ask the user before a choice that changes runtime behavior and is not35 covered here.3637## 1. Preflight38391. Read `pubspec.yaml`. Note which of these are dependencies and their40 versions: `supabase_flutter`, `supabase`, `gotrue`, `postgrest`,41 `realtime_client`, `storage_client`, `functions_client`.422. Run `git status`. If the tree is dirty, ask the user to commit or stash43 first so the migration is one reviewable diff.443. Run `dart analyze` and save the output. Issues that exist before the45 migration are the baseline, and step 9 is measured against it.464. Check for a `supabase/` folder with `config.toml` and `migrations/`. It47 decides the source of the generated types in step 4.4849## 2. Supabase CLI 3.0.0 or newer5051Dart generation requires Supabase CLI 3.0.0 or newer.5253```sh54supabase --version55```5657If the project runs the CLI through npm (a `supabase` entry in58`package.json`), check `npx supabase --version` instead.5960If the command is missing or prints a version below `3.0.0`, stop and give61the user the command for their platform, then wait until the version check62passes:6364| Install method | Upgrade command |65| ----------------------- | ---------------------------------------------------------------------- |66| Homebrew (macOS, Linux) | `brew upgrade supabase/tap/supabase` |67| npm | `npm install --save-dev supabase@latest` |68| Scoop (Windows) | `scoop update supabase` |69| Not installed | https://supabase.com/docs/guides/local-development/cli/getting-started |7071Do not continue on an older CLI and do not fall back to hand-written types.7273## 3. Pin the changed `order()` defaults while still on v27475v3 changed two defaults of `order()` without a compile error. Both pins76below already mean the same thing on v2, so add them before upgrading:7778```sh79grep -rnE '\.order\(' lib test bin80```8182- A call without `ascending:` sorted descending on v2 and sorts ascending on83 v3. Add `ascending: false`.84- A query that sorts descending (including the ones you just changed) put85 `NULL`s last on v2 and puts them first on v3. When the column is nullable,86 add `nullsFirst: false`. This does not apply to `stream().order()`, which87 takes no null placement.8889The direction pin applies to `stream().order()` too. The result is that every90`order()` call states its direction and, on a descending query of a nullable91column, its null placement.9293## 4. Dependencies and the typed schema9495Once `supabase_typegen` is added, its `supabase-typegen-generate` skill has96the details of the generator, its options and its errors.97981. Update the dependencies. Use the newest 3.x version of each package;99 `dart pub outdated` lists it, prereleases included.100 - `supabase` to 3.x.101 - Replace any direct dependency on a renamed package, and its imports:102103 | v2 | v3 |104 | ------------------ | -------------------- |105 | `gotrue` | `supabase_auth` |106 | `realtime_client` | `supabase_realtime` |107 | `storage_client` | `supabase_storage` |108 | `functions_client` | `supabase_functions` |109110 A direct dependency that only duplicates what `supabase` already111 re-exports can be removed instead.1122. Add the generator: `dart pub add dev:supabase_typegen`.1133. Run `dart pub get`.1144. Generate the schema. Pick the source:115 - A `supabase/` folder with migrations: run `supabase start` (needs Docker),116 then `supabase gen types --lang dart`.117 - A project linked with `supabase link`: `--remote`.118 - Otherwise ask the user for the project ref and use119 `--remote=<ref>`.120121 Ask which schemas the app queries. Pass `--schema` for each schema other122 than `public` that the app uses. Write to `lib/supabase_schema.g.dart`123 unless the project already has a generated-code convention:124125 ```sh126 supabase gen types --lang dart > lib/supabase_schema.g.dart127 ```1285. Run `dart analyze lib/supabase_schema.g.dart`. It must be clean. If it is129 not, report the error to the user rather than editing the file.130131## 5. Mechanical renames132133Apply these across the project before reading compiler errors, since they134remove most of them. The tables are in the reference:135136- "The client packages are renamed": imports and the `GoTrue*` type names,137 such as `GoTrueClient` to `AuthClient`.138- "Abbreviations in the public API are spelled out": for example139 `queryParams:` to `queryParameters:` and `opts:` to `options:`.140- "Plural enum names singularized" and "One shared `SortDirection` for every141 sort direction".142- "Every deprecated API is gone": for example `User.confirmedAt` to143 `User.emailConfirmedAt` and `AuthUser` to `User`.144145## 6. Compiler-driven pass1461471. Run `dart analyze`.1482. For each new error, search the reference for the symbol it names and apply149 the "After" form of that section.1503. Repeat until the only issues left are the baseline from step 1.151152The sections that most often apply:153154- "Sign-in methods that always issue a session return the `Session`":155 `signInWithPassword()` and others return the `Session` directly.156- "`AuthState` is a sealed class" and157 "`User.appMetadata` is an `AppMetadata` and `userMetadata` is never null".158- "Realtime listener callbacks are now streams": `onPostgresChanges`,159 `onBroadcast` and the connection callbacks.160- "The auth client persists the session itself": `localStorage:` and161 `LocalStorage` subclasses become an `AuthAsyncStorage`.162- "Service exceptions share one base" and "`FunctionsException` is sealed".163- "Every client takes one `SupabaseRetryOptions`".164- "Timestamps are `DateTime` instead of `String` or `int`".165- "`rpc` is a getter", "`insert()` and `upsert()` no longer take filters" and166 "The rest client and its builders are stateless".167168## 7. Changes the compiler will not catch169170Go through every item. For each one, search with the given pattern, read171every match, and fix or confirm it. Keep a list of the sites you could not172decide for the summary in step 9.173174| Change (reference section) | Search | Action |175| ----------------------------------------------------------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |176| `order()` defaults | `\.order\(` | Confirm step 3 covered every call. |177| `RealtimeClient.connectionState` is now typed | `connectionState` | Compare against `SocketState.open` and friends, not strings. Prefer `isConnected`. |178| `HttpMethod` is one shared enum | `HttpMethod\.[a-z]+\.index` | Persist `name` instead of `index`. |179| Confirming an email or phone change emits `userUpdated` | `AuthChangeEvent\.signedIn` | Handle `userUpdated` where an email or phone change confirmation should be seen. |180| `AuthChangeEvent.initialSession` is emitted to every subscriber | `onAuthStateChange` | Listeners that act on `signedIn` at subscription time must also act on `initialSession`. |181| A client without an `asyncStorage` keeps pkce verifiers in memory | `SupabaseClient\(` | A directly constructed client whose pkce flow completes in another process, such as from an email link, passes a persistent `AuthClientOptions(asyncStorage: …)`. |182| The retry backoff defaults are the same in every client | `retryOptions\|SupabaseRetryOptions` | Ask whether the old PostgREST curve matters. If it does, pass the options shown in the reference. |183| The rest client and its builders are stateless | `=\s*await .*\.(insert\|upsert\|update\|delete)\(` | A write without `select()` resolves to `void`. Drop the assignment or add `.select()`. |184| `userMetadata` is never null | `userMetadata\s*(\?\|==\|!=)` | Remove the dead null checks. |185| `PostgresChangePayload.errors` is a `List<String>` | `errors\s*[!=]=\s*null` | Replace `!= null` with `errors.isNotEmpty` and `== null` with `errors.isEmpty`. |186| `SupabaseClient` builds its own default HTTP client | `runWithClient` | Pass the client as `httpClient:` instead. |187| The Supabase URL must use `https` | `SupabaseClient\(\|Supabase\.initialize` | Trace the URL of each call, including one from `String.fromEnvironment`. Use `https` unless the host is loopback, or pass `allowInsecureHttp`. |188| A request that gets no response throws a transport exception | `on ClientException\|on TimeoutException` | Catch `SupabaseTransportException` around Supabase calls. |189| A failing `accessToken` callback throws `AccessTokenException` | `accessToken:` and transport exception catches | Catch `AccessTokenException` where token failures were handled. |190| The request timeout bounds idle time | `requestTimeout` | Add `.timeout(…)` on the builder where a total deadline was intended. |191| Realtime throws exceptions instead of strings | `on String\|toString\(\)\.contains` near `subscribe`, `httpSend`, `track`, `send` | Catch `StateError`, `RealtimeApiException` or `RealtimeTransportException`. |192| Signing out removes every channel | `\.subscribe\(` | Subscribe a channel that must outlive a sign-out, such as a public one, again after `AuthSignedOut`. |193| Cross-tab session sync is opt-in for standalone clients | `AuthClientOptions\(` | On web, pass `persistSession: true` where the session must be shared and persisted. |194195Search `lib`, `test`, `bin` and any other source folders with196`grep -rnE '<pattern>'`.197198## 8. Move every query to the typed `table()` API199200Follow the reference section "Moving from `from()` to the typed table API".201Convert one table at a time and re-run `dart analyze` after each.202203Naming in the generated file: table `books` in `public` is `Books`,204`BooksRow`, `BooksInsert` and `BooksUpdate`. A table in another schema205carries the schema as a prefix, `inventory.books` is `InventoryBooks`, and206`supabase.schema('inventory').from('books')` becomes207`supabase.table(InventoryBooks.table)`. Columns are camelCase constants on the208table class, `Books.authorId`.209210| Untyped | Typed |211| ------------------------------------------------------ | -------------------------------------------------------------------------- |212| `.from('books').select()` | `.table(Books.table).select()` |213| `.select('id, title')` | `.selectOnly([Books.id, Books.title])`, read with `row.title` |214| `.select('title, authors(name)')` | `.selectOnly([Books.title, Books.authors(Authors.name)])` |215| `.eq('author_id', 2)` | `.where(Books.authorId.eq(2))` |216| `.or('price.lt.10,in_print.eq.false')` | `.where(Books.price.lt(10) \| Books.inPrint.isFalse())` |217| `.order('created_at', ascending: false)` | `.order(Books.createdAt.desc())` |218| `.order('price', ascending: false, nullsFirst: false)` | `.order(Books.price.desc().nullsLast())` |219| `.limit(3, referencedTable: 'books')` | `.embedded(Authors.books, (books) => books.limit(3))` |220| `.eq('books.title', 'Dune')` | `.embedded(Authors.books, (books) => books.where(Books.title.eq('Dune')))` |221| `.select('name, books!inner(title)')` | `.selectOnly([...]).requiring(Authors.books)` |222| `.isFilter('books', null)` | `.where(Authors.books.isNull())` |223| `.insert({...})` | `.insert(BooksInsert(...))` |224| `.insert([{...}, {...}])` | `.insertAll([BooksInsert(...), ...])` |225| `.update({...}).eq('id', 1)` | `.update(BooksUpdate(...)).where(Books.id.eq(1))` |226| `.update({'price': null})` | `.update(BooksUpdate(price: null))` |227| `.delete().eq('id', 1)` | `.delete().where(Books.id.eq(1))` |228| `.delete()` with no filter | `.delete().all()` |229| `.upsert({...}, onConflict: 'name')` | `.upsert(AuthorsInsert(...), onConflict: [Authors.name])` |230| `.stream(primaryKey: ['id']).eq('author_id', 2)` | `.stream(primaryKey: [Books.id]).filter(Books.authorId.eq(2))` |231| `.rpc('search_books', params: {'query': q})` | `.rpc.searchBooks(query: q)` |232233Rules for the conversion:234235- Carry the direction pinned in step 3 over: `ascending: false` becomes236 `.desc()`, and `nullsFirst: false` becomes `.nullsLast()`. An `order()` with237 neither stays a plain column, which is ascending. A typed `stream()` takes238 the same orderings, but throws an `ArgumentError` on `.nullsFirst()` or239 `.nullsLast()`, since it always places `NULL`s last ascending and first240 descending.241- A typed `update()` or `delete()` sends nothing until it has `.where(…)` or242 `.all()`. A bare `await` of one compiles and silently does nothing, and the243 analyzer reports it as an `unused_result` warning. Fix every one of them.244- A parameter of an `Insert` or `Update` type that is left out leaves the245 column out, and passing `null` writes SQL `NULL`, the same as a key that is246 missing from the map or set to `null`.247- `insertAll()` and `upsertAll()` give a column left out of only some rows its248 database default, where the untyped list `insert()` wrote `NULL`, and take249 no `defaultToNull`. Where the code relied on `NULL`, pass `null` for the250 column in those rows.251- Replace `row['title'] as String` with `row.title` wherever the rows are252 consumed. A model class that only mirrors a table is replaced by the253 generated row type. A model that adds behavior is built from the row254 getters, not from `toJson()`.255- An operator with no typed method uses `Books.title.raw('eq.Dune')`. A filter256 on a JSON path uses `Books.metadata.jsonText('edition').eq('first')`.257258`from()` and the untyped `rpc('fn', params: …)` remain only for:259260- a table, view or function missing from the generated file because its261 schema was not generated or is not exposed through the Data API,262- a table name computed at runtime,263- a function the generator gives no method, which it explains in a comment in264 the generated file.265266## 9. Verify and report2672681. `dart analyze` shows nothing beyond the baseline from step 1.2692. Run `dart format` on every file you changed. Do not format270 `lib/supabase_schema.g.dart`, which is already formatted.2713. Run `dart test`. Fix failures the migration caused and report the rest.2724. Give the user a short summary:273 - the dependency changes and the generated schema file and command,274 - every site from step 7 that needs a human decision,275 - every remaining `from()` or untyped `rpc()` call and its reason,276 - that the schema must be regenerated with the same command after every277 change to the database schema, whether from a migration or the278 dashboard, and after upgrading `supabase_typegen` or the Supabase CLI.