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
1
vote
0 answers

Supabase cli start with phone authentication provider

I'm trying to get a locally started Supabase instance to support phone authentication. I started Supabase using the CLI: supabase start I didn't find anything phone/sms/otp related in the CLI config documentation:…
Ranil Wijeyratne
  • 626
  • 7
  • 19
1
vote
1 answer

Batch delete rows matching multiple columns in postgres using an array

i'd like to delete these rows from a table in a postgres function as an array parameter: {id1: 4, id2: 8} {id1: 4, id2: 9} {id1: 5, id2: 8} that is, something like this: delete from mytable where (id1, id2) = ANY(Array [(4,8), (4,9),…
stuart
  • 1,785
  • 2
  • 26
  • 38
1
vote
1 answer

How to bulk delete in Supabase using multiple columns?

is the supabase api able to delete multiple rows at a time which are each identified by multiple column values? something like: const { data, error } = await supabase .from('list_members') .delete() .in('{list_id,contact_id}', ['{7,2}',…
stuart
  • 1,785
  • 2
  • 26
  • 38
1
vote
1 answer

Superbase db query from URL

I'm struggling to formulate a supabase db query from multiple tables, whilst using a value from a URL. I have 3 tables (simplified)... series > id, series authors > id, name books > id, title, series_id(fk), authors_id(fk) I want to get a list of…
Sniffer
  • 6,242
  • 10
  • 45
  • 53
1
vote
0 answers

Using dynamic supabase options with different schema

So I am using "@supabase/supabase-js": "2.4.1" and I cant seem to change dynamically the schema. Previously using v1 I can just pass the schema to the custom hooks and called the supabse client like so const newOptions = { ...options, schema:…
Eko Andri
  • 181
  • 2
  • 5
  • 17
1
vote
1 answer

Supabase - Row Level Security Policy (RLS) how to limit access with SUPABASE_ANON_KEY to authenticated user only?

So I enable RLS by using the template and trying to limit access to only logged in user CREATE POLICY "Enable read access for authenticated users" ON "public"."item" AS PERMISSIVE FOR SELECT TO authenticated USING (true) A supabase client is like…
Eko Andri
  • 181
  • 2
  • 5
  • 17
1
vote
1 answer

Query from multiple tables in supabase?

I have 2 tables in supabase. We have a post table and an image table. Each post contains multiple images. In my image table, I have the post_id and url. The post_id is a foreign key to post's id. Post Table: | id | contents | | --------…
Misu Kuma
  • 65
  • 8
1
vote
1 answer

How to fetch data from supabase

I tried this by exploring web and supabase docs but nothing really happens import 'package:supabase/supabase.dart'; class supahandelar { static const SupaUrl = 'UrlFromSupabase'; static const SupaKey = 'KeyFromSupabase'; final client =…
Dixit Ram
  • 43
  • 6
1
vote
0 answers

How can I make a Supabase CRON job to delete specific data every day?

I want to give users a period of time in which they can undo their account deletion. Someone suggested that I should use a CRON job that (1) checks my Supabase table daily for users who deleted their accounts over 30 days ago and (2) deletes those…
Globe
  • 169
  • 11
1
vote
1 answer

Supabase - post user sign up verification step - can Supabase handle this logic?

I am experimenting with Supabase as a replacement for Firebase. When it comes to the Authentication functions, I am trying to replicate what is offered in Firebase. With Firebase, if you create a new email/password user, then Firebase will send out…
user2868835
  • 1,250
  • 3
  • 19
  • 33
1
vote
0 answers

Supabase check whether a user is currently in/listening to a realtime channel from postgres function

How can one, from a postgres function, check whether a user is currently in/listening to a realtime channel? I want to create notification entries in the database only if the user is not currently online.
Ruud14
  • 117
  • 7
1
vote
1 answer

How to return this query in supabase function

I have a table called helper which have columns id(text), title(varchar), tags(varchar), author_name(varchar), profile_pic(varchar), created_at(timestampz) I made a supabase function: create or replace function hello(si text) returns setof ________…
1
vote
2 answers

Get count and specify range in a supabase js query

Im making a recipe website with nextjs and supabase. I have an occasions table which has a foreign key to many recipes. I can easily query the occasions for all recipe in that occasion however I want to paginate so I need a count and a range. How…
Yesthe Cia
  • 528
  • 1
  • 7
  • 20
1
vote
1 answer

Am I not properly performing update(goal)?

I am building an app in Vue that is tracking the sum of donations paid to my ExtraLife Team and tallies them up based on a user-submitted #tag in the message provided with the donation. Currently, I've been working on a Goal Editor view using what…
Scyne
  • 33
  • 6
1
vote
0 answers

Supabase file uploading occasionally fails

Sometimes I can upload a file and sometimes I get this error: {statusCode: '403', error: '', message: 'new row violates row-level security policy (USING expression) for table "objects"'} I got the uploading code from this page. I duplicated the…
Mintee
  • 505
  • 4
  • 22