• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase / 27354964162
74%

Build:
DEFAULT BRANCH: master
Ran 11 Jun 2026 02:46PM UTC
Jobs 1
Files 96
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Jun 2026 02:41PM UTC coverage: 72.533%. Remained the same
27354964162

push

github

web-flow
fix: omit cleared default fields on row insert (#46826)

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

Closes #46824 

In the Studio table editor, when inserting a new row into a table with
an auto-generated primary key (or any non-text column with a default
value), clearing the field after editing it sends an empty string `""`
in the insert payload. This causes Postgres to reject the insert with:

```txt
ERROR: 22P02: invalid input syntax for type bigint: ""
```

## What is the new behavior?

When inserting a new row, cleared fields that are
identity/default-backed and non-text are now omitted from the insert
payload, so Postgres applies the column default or identity generation
instead of receiving an empty string.

For example:
- id bigint generated by default as identity cleared → omitted, Postgres
auto-generates id.
- created_at timestamptz default now() cleared → omitted, Postgres
applies now().
- name text cleared → preserved as "", because empty string is a valid
explicit text value.

## Additional context

After the fix:


https://github.com/user-attachments/assets/78e9eb9c-9518-4894-8547-d18ffa78869a


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* New-record saving now respects column defaults and identity behavior:
empty inputs for identity or defaulted non-text columns are omitted so
defaults are applied, while intentional empty strings for text fields
are preserved.

* **Tests**
* Added test coverage validating new-row creation behavior with
default/identity handling and empty-text preservation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Ali Waseem <waseema393@gmail.com>

990 of 1384 branches covered (71.53%)

Branch coverage included in aggregate %.

1524 of 2082 relevant lines covered (73.2%)

249.19 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 27354964162.1 11 Jun 2026 02:46PM UTC 96
72.53
GitHub Action Run
Source Files on build 27354964162
  • Tree
  • List 96
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27354964162
  • bbe5afff on github
  • Prev Build on master (#27353995611)
  • Next Build on master (#27360115669)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc