Questions tagged [supabase-database]

Supabase is a database solution powered by PostgreSQL. Under the hood, Supabase uses PostgREST, an open source tool to make automatically create REST API for PostgreSQL databases. Supabase utilizes row level security feature on top of PostgREST to provide authorization. Use this tag when you are having problems, and not to ask for new features.

Supabase Database is a component of Supabase that automatically creates RESTful APIs for your Supabase database backed by PostgreSQL. Under the hood, Supabase uses PostgREST, an open source tool to create REST APIs for your PostgreSQL database. Supabase utilizes row level security feature on top of PostgREST to provide authorization. Use this tag when you are having problems, and not to ask for new features.

Supabase Database comes with:

  • intuitive table editor
  • clients in various languages to communicate with the database
  • SQL editor to easily run SQL on your database
330 questions
5
votes
2 answers

PostgREST - Add authenticated user id on insert

I need to automatically add an author of an inserted row in one of its columns. I am using postgREST (using Supabase cloud service) and I don't want users to add whoever they want as the author. Is there a way to automatically add user id of the…
TomasB
  • 604
  • 5
  • 18
5
votes
1 answer

How to upload file from python Flask web app to Supabase Storage

I want to be able to upload a file from Flask to Supabase Storage, but it only has documentation for the javascript api link to docs. Also, I can't find any examples or any open source project that does that. Here it is my function to upload: def…
5
votes
1 answer

Is there a way to perform full text search on multiple columns on Supabase with Javascript?

I've tried using many symbols to separate columns; ||, |, &&, & with and without spaces. For instance .textSearch("username, title, description", "..."); .textSearch("username|title|description", "..."); And nothing has worked :(
4
votes
0 answers

Supabase "TypeError: fetch failed"

I am making a to-do list application with Supabase and NextJS-13 and while fetching the lists from Supabase, the server gave me this error Error Image My List table on Supabase has three columns: id created_at list_name Supabase generates the…
4
votes
1 answer

Supabase dynamic RPC function

I am looking to create an RPC for grabbing distinct values of a column but I am going to be doing this across multiple tables and I don't want to have to write this function over and over for each column and each table. I have the following SQL…
Craig Howell
  • 1,114
  • 2
  • 12
  • 28
4
votes
1 answer

Supabase triggers : ERROR: function charindex(unknown, text) does not exist (SQLSTATE 42883) (SQL)

I have two tables auth (this is the default one given by supabase) and profiles when a new row is added in auth table I want a new row with the data added in auth table to be added in profiles tables as well Profiles tables has 3 columns…
4
votes
2 answers

Supabase not allowing upload of files into storage bucket

I have a simple script for uploading a .txt file into a Supabase bucket named 'training-data'. The bucket was made public, and I made sure to include the necessary storage/object policies in order to allow access. I know others have encountered the…
Chubbyman
  • 73
  • 1
  • 6
4
votes
1 answer

Unable to push local migrations to Supabase through CLI

I tried to push the local migrations to the supabase database through its cli with the command supabase db push. The error it is showing me is: Error: ERROR: must be owner of table users (SQLSTATE 42501) I had set up the cli with supabase db remote…
Electric Dragon
  • 176
  • 5
  • 17
4
votes
1 answer

"Uncaught Error: More than one relationship was found" with Supabase client query

I'm building a multitenant app and running into an error after adding multiple relations that point to the same table: Uncaught Error: More than one relationship was found for teams and users When performing this query: const data = await…
tdc
  • 5,174
  • 12
  • 53
  • 102
3
votes
1 answer

How to make a boolean form input in supabase using nextjs server actions?

I am trying to make a form to submit data to supabase (with nextjs 13). I can submit a string input. I am trying to add a boolean field. I have commented out the 'published' fields in this form. If I try using this approach, and enter any of 'true'…
Mel
  • 2,481
  • 26
  • 113
  • 273
3
votes
1 answer

Can't update an image from the bucket

I've been trying to update a single file within a folder in the bucket that i created but when i go to update with a new image from the front does not update the image and gives the following error. statusCode: "404", error: "Not found" Then when i…
Richi
  • 438
  • 5
  • 18
3
votes
1 answer

Failed to create and edit tables in Supabase, "Failed to create pg.columns:..."

I have failed to create or edit tables in Supabase. It is showing an error message "Failed to create pg.columns: must be the owner of event trigger pgsodium_trg_mask_update". I think it has something to do with the launch of supabase vault, but I…
Charles Kasasira
  • 240
  • 1
  • 5
  • 15
3
votes
1 answer

How to link a storage bucket file into an item in a table

How can I link a file in my storage bucket into a table? Let's say I have an item like this Name: user, CreatedAt: date, pfp: storageFile I want the file to be linked to the pfp field.
3
votes
1 answer

supabase.auth.getUser() returns error on vue-router route guard

I am attempting to build a Vue application that uses Supabase authentication. Inside one of the route guards in the router file, I implemented supabase.auth.getUser() in order to retrieve the user login status for a conditional that prevents next()…
JS_is_awesome18
  • 1,587
  • 7
  • 23
  • 67
3
votes
1 answer

How to add Supabase Order by in get request using Postman

I need to add order in supabase result while calling the supabase bash in postman. I am doing same in flutter like below Future getPropertiesFromBirmingham() async { var response = await client .from('properties') .limit(10) …
1
2
3
21 22