Supabase | cannot insert a non-DEFAULT value into column
01kg
Posted on September 30, 2024
Full Error:
PostgrestException(message: cannot
insert a non-DEFAULT value into
column "id", code: 428C9, details:
Column "id" is an identity column
defined as GENERATED ALWAYS., hint:
Use OVERRIDING SYSTEM VALUE to override.)
Table:
create table dog (
id bigint generated always as identity primary key,
name text,
description text,
user_id uuid references auth.users on delete cascade on update cascade
);
Solution
According to this answer, no way to use OVERRIDING SYSTEM VALUE in Supabase.
Should use generated by default
while creating "id" field.
💖 💪 🙅 🚩
01kg
Posted on September 30, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
githubcopilot AI Innovations at Microsoft Ignite 2024 What You Need to Know (Part 2)
November 29, 2024