0

I am trying to insert a row into a table named "Requests" through supabase

const { data, error } = await client
    .from('Requests')
    .insert( [
        { Name: 'Xyz', Email: 'Xyz@gmail.com', Type: 'ABC', Description: 'test test 123' },
    ])

console.log(data, error)

The table looks like this:

CREATE TABLE Requests (
    Rid         bigint,
    Name        varchar,
    Email       varchar,
    Type        varchar,
    Description varchar
)

but when the code is executed it gives this error:

{
    code: '42703',
    details: null,
    hint: null,
    message: 'column "Description" of relation "Requests" does not exist'
}

What am I doing incorrectly?

Dai
  • 141,631
  • 28
  • 261
  • 374
au799
  • 3
  • 1
  • See here: https://stackoverflow.com/questions/695289/cannot-simply-use-postgresql-table-name-relation-does-not-exist the problem might be because of how Postgres handles uppercase characters in column names and table-names. – Dai Oct 08 '22 at 09:23
  • i changed my table and column names to all lowercase and uppercase but still getting the same error – au799 Oct 08 '22 at 09:41
  • What happens when you trying inserting data through the Supabase Dashboard instead? – Andrew Smith Oct 09 '22 at 14:34
  • Couldnt quite figure out what the problem was but removing and than adding the table again made the api call work. – au799 Oct 11 '22 at 05:56

0 Answers0