© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
wuh

Inserting dummy data from seed.sql

I'm using the Supabase CLI, trying to insert some dummy data through seed.sql when local hosting and wondering what I'm doing wrong.

create table public.foobar
(
    id          uuid primary key         default gen_random_uuid(),
    inserted_at timestamp with time zone default timezone('utc'::text, now()) not null,
    name        text    not null
);

insert into public.foobar (id, name) values ('5e0ade32-e006-402c-a8da-50eb455560b4', 'Test name');
create table public.foobar
(
    id          uuid primary key         default gen_random_uuid(),
    inserted_at timestamp with time zone default timezone('utc'::text, now()) not null,
    name        text    not null
);

insert into public.foobar (id, name) values ('5e0ade32-e006-402c-a8da-50eb455560b4', 'Test name');


When I run
supabase db reset
supabase db reset
I get the following error:
{"Type":"ErrorResponse","Severity":"ERROR","SeverityUnlocalized":"ERROR","Code":"42P01","Message":"relation \"public.foobar\" does not exist","Detail":"","Hint":"","Position":13,"InternalPosition":0,"InternalQuery":"","Where":"","SchemaName":"","TableName":"","ColumnName":"","DataTypeName":"","ConstraintName":"","File":"parse_relation.c","Line":1360,"Routine":"parserOpenTable","UnknownFields":null}
{"Type":"ErrorResponse","Severity":"ERROR","SeverityUnlocalized":"ERROR","Code":"42P01","Message":"relation \"public.foobar\" does not exist","Detail":"","Hint":"","Position":13,"InternalPosition":0,"InternalQuery":"","Where":"","SchemaName":"","TableName":"","ColumnName":"","DataTypeName":"","ConstraintName":"","File":"parse_relation.c","Line":1360,"Routine":"parserOpenTable","UnknownFields":null}


However if I run the same code in the Supabase SQL Editor with a clean database it runs fine and inserts the dummy data as intended.

If I comment out the "insert into"-line, the table is created and I can later do the insert through the SQL Editor without problems.

What am I doing wrong? 🙂
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Inserting data from pgAdmin4 using csv
SupabaseSSupabase / help-and-questions
4w ago
create dummy data for testin
SupabaseSSupabase / help-and-questions
4y ago
[solved] Generating users in seed.sql
SupabaseSSupabase / help-and-questions
4y ago
Normalizing SQL Data
SupabaseSSupabase / help-and-questions
4y ago