https://supabase.com/ logo
Join Discord
Powered by
# help
  • s

    ShaneTheKing

    04/25/2022, 1:41 PM
    If I want to create my environment on app.supabase.io instead of a local environment, is there a way to create database migration scripts that I can later run in a different environment? I don't like that I can't use triggers locally, so I'm not developing against a local instance at the moment, but would still like migration scripts.
    n
    f
    • 3
    • 4
  • m

    Martin INDIE MAKERS

    04/25/2022, 4:18 PM
    hey guys i'm doing a dump of my DB to create a preprod but it seems the RLS are not include in backup do you know how i can get it ?
    n
    • 2
    • 1
  • c

    crasty

    04/25/2022, 5:46 PM
    Hi, I'm sure this question was asked at least once (I found this question in general, asked by user mellson), but id did not found any answer, so I'm asking as well: Is there any speed difference between free and pro accounts?
    n
    g
    • 3
    • 4
  • e

    Embm

    04/25/2022, 7:45 PM
    Hi! I'm trying to figure out why running something like
    Copy code
    sql
    create or replace trigger on_user_update
    before update on public.profiles for each row execute procedure handle_user_update;
    in the cloud's sql editor returns
    syntax error at or near "trigger"
    but works fine if I omit the replace attempt ? Am I not doing it properly, from my understanding supabase runs Pg14.1 which should support
    create or replace trigger ...
    .
    n
    g
    • 3
    • 4
  • b

    Ben-jam-in

    04/25/2022, 7:46 PM
    anyone here hosting apps on DigitalOcean? Trying to figure out how to add my URL and Anon keys to digitalocean and call them into the app. This way I dont have to save that info on the github. Any ideas or advice?
    n
    • 2
    • 1
  • x

    xephyr

    04/26/2022, 12:48 AM
    I've just run a
    supabase db remote commit
    and the output has this pattern for several tables:
    Copy code
    REVOKE ALL ON TABLE public.user_settings FROM authenticated;
    REVOKE ALL ON TABLE public.user_settings FROM postgres;
    REVOKE ALL ON TABLE public.user_settings FROM service_role;
    GRANT ALL ON TABLE public.user_settings TO authenticated;
    
    GRANT ALL ON TABLE public.user_settings TO postgres;
    
    GRANT ALL ON TABLE public.user_settings TO service_role;
    Seems kinda redundant, is this some quirk of migrations that is necessary or something I can delete?
    n
    • 2
    • 2
  • d

    Daniel_pttb

    04/26/2022, 2:48 AM
    Hey guys, anyone knows if Supabase is backed up automatically, and how to revert to a backup?
    n
    g
    • 3
    • 5
  • c

    cjog

    04/26/2022, 8:14 AM
    Hi all.
    supabase db remote commit
    blows up for me with the error
    Error: unexpected end of JSON input
    . I am on supbase cli version 0.25.0. Any suggestion to debug the issue. The password in the connection string for the remote does not have any special characters as mentioned here in this similar issue from some versions ago - https://github.com/supabase/cli/issues/95.
    n
    • 2
    • 1
  • s

    Studywithdesign

    04/26/2022, 8:26 AM
    can i have two step verification on user signin.
    n
    • 2
    • 3
  • n

    Needle

    04/26/2022, 8:38 AM
    Hello @max! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
  • m

    max

    04/26/2022, 8:38 AM
    I'm trying to use the following postgres function:
    Copy code
    create or replace function get_activities(radius int, point text) 
    returns setof activities as $$
    
        var json_result = plv8.execute(
        "SELECT activities.id, activities.name, activities.time, activities.participant_limit, row_to_json(activities_user.*) AS user FROM activities LEFT JOIN LATERAL ( SELECT users.full_name, users.avatar_url FROM users WHERE activities.added_by = users.id ) AS activities_user ON TRUE WHERE ST_DWithin(location, $1::geometry, $2) ORDER BY time asc", [point, radius]
        );
    
        return json_result;
    $$ language plv8;
    Running the query itself works fine, but when trying to run this function via
    supabase.rpc
    I get a 500 with error code XX000 and message "field name / property name mismatch". I'm guessing that it is because my return type "activities" does not include the users table's field that I'm adding as part of the query. Any ideas how I can fix this?
    n
    s
    • 3
    • 5
  • s

    shubhj_45

    04/26/2022, 12:26 PM
    Hello all, my project is based on django and I am using MongoDB as the database, now i want to switch to PostgreSQL through Supabase. So, can someone guide me what changes do I need to make in my code, so that all the data in the database gets reflected in the Supabase interface. Thanks
    n
    g
    • 3
    • 3
  • s

    sangle

    04/26/2022, 3:56 PM
    Hello all. I tried to create this table but receive such a weird error. I couldn't fix the issue. Please advise!
    n
    g
    • 3
    • 5
  • s

    stopa

    04/26/2022, 5:57 PM
    Hey team, noob question. Say I have the following join table relation:
    Copy code
    bookshelf { user_id, id, title, ...} 
    book { id, title, ... }
    bookshelf_book { book_id, bookshelf_id, ordering }
    How would I go about getting all the bookshelves, with the book and ordering attached from the client?
    n
    l
    • 3
    • 5
  • n

    Needle

    04/26/2022, 6:06 PM
    Hello @benank! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
    • 1
    • 3
  • n

    Needle

    04/26/2022, 7:13 PM
    Hello @aquaspirit! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
    a
    • 2
    • 3
  • m

    mangysaurus

    04/26/2022, 7:24 PM
    Hi, I'm trying to left join profile data with a reservation_request table with an RLS policy. Do I need to apply multiple RLS policies (one for profile and another for reservation_requests)
    n
    g
    • 3
    • 7
  • n

    Needle

    04/26/2022, 7:24 PM
    Hello @mangysaurus! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
    • 1
    • 2
  • p

    Pacqui

    04/26/2022, 8:10 PM
    Hey, so redirecting from a email sign in doesnt work
    Copy code
    await supabase.auth.signIn({ email, password }, { redirectTo: "http://localhost:3000/auth/redirect?url=/abc" })
    thats the code. user logs in but it doesnt redirect anywhere
    n
    g
    • 3
    • 7
  • m

    Mihai Andrei

    04/26/2022, 8:51 PM
    Hello guys! Does Anyone have an implementation for supabase auth with an external database? Like, just having the Users in supabase, But the data in another database(mongo/postgres). I was curious how would someone make Roles since i Didnt manage to add custom claims to the token
    n
    • 2
    • 4
  • c

    CornusAmmonis

    04/27/2022, 2:18 AM
    Hello, I have a quick question, is it possible to set up triggers on insert/update into a storage bucket? I want to update a row in a table in my public schema when that happens
    n
    g
    • 3
    • 10
  • k

    Keooo

    04/27/2022, 4:14 AM
    Hello All im getting this error when trying to acsess a storage bucket using next image {"statusCode":"400","error":"Bad Request","message":"querystring should have required property 'token'"} ((bucket_id = 'products'::text) AND (storage.extension(name) = 'jpg'::text) AND (lower((storage.foldername(name))[1]) = ''::text) AND (role() = 'anon'::text)) I have RLS ON and I have this police so all can select but its saying I need a token still?
    n
    k
    • 3
    • 4
  • u

    4a6d65

    04/27/2022, 11:01 AM
    I was wondering if anyone knows whether it's possible to read the headers on an edge function request? Looking at the APIs it doesn't look like that's the case, at least nothing that would be useful such as user-agent or sec-ch-ua-mobile
    n
    g
    • 3
    • 4
  • c

    cma

    04/27/2022, 11:32 AM
    Hi there, im having a problem with testing the connection to supabase with Prisma. im getting the following: Error: P1001: Can't reach database server at `postgres`:`5432` . I copied the connection string from the supabase app and added in the db password and am having no luck. I've also tried adding timeout arguments as i've found that as a solution online but not having luck with that either.
    n
    • 2
    • 4
  • l

    Ludvig

    04/27/2022, 2:57 PM
    Hey! I'm trying to update my
    customer
    table via the supabase-js client.
    Copy code
    javascript
    const { data: dataCustomerUpdate, error: errorCustomerUpdate } =
    await supabase.from("customer").update(
      {
        first_name: checkoutForm.billingFirstName,
        last_name: checkoutForm.billingLastName,
        email_address: checkoutForm.billingEmail,
        mobile_phone_number: checkoutForm.billingMobilePhoneNumber,
      },
    )
    .eq("id", customerIdSelectedFromIncomingOrderTable) // Here is where I need help.
    I need to find what
    customer
    row to update. This is the problem. I have another table called
    incoming_order
    which contains a
    stripe_payment_id
    and the foreign key
    customer_id
    which I'm looking to select. I have the
    stripe_payment_id
    string which should be used to find (filter for) the correct row in
    incoming_order
    , and from that row I need to get the
    customer_id
    used instead of the
    customerIdSelectedFromIncomingOrderTable
    which I wrote above. I'm looking to do it all in this one query if that is possible.
    n
    s
    • 3
    • 6
  • p

    prabha

    04/27/2022, 4:17 PM
    can i move from supabase cloud to selfhost ?
    n
    o
    • 3
    • 4
  • c

    chek

    04/27/2022, 6:56 PM
    Hello -- I can't seem to update my billing card on app.supabase.io
    n
    s
    • 3
    • 6
  • s

    stevharve

    04/27/2022, 9:25 PM
    Does anyone have or know a good state management example using RTK or similar?
    n
    o
    • 3
    • 5
  • b

    bjorgen

    04/28/2022, 12:52 AM
    I've just set up my supabase instance and I'm not seeing the schema pass over into my GraphQL client. Has anyone run into this? I think that I've got my permissions set up correctly but to be honest I'm not really sure which to set. The REST API works just fine for the given table that I'm looking for for reference. Additionally, I'm getting A schema, it simply has a heartbeat on the endpoint and that does work.
    n
    h
    • 3
    • 6
  • p

    prabha

    04/28/2022, 5:32 AM
    Supabase not working on DO,
    n
    o
    • 3
    • 11
1...263264265...316Latest