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

    garyaustin

    01/08/2022, 9:11 PM
    I don't think there is a "best". Here was a discussion awhile back on it. Search "text search" here for other discussions. https://discord.com/channels/839993398554656828/903770142465466408
  • s

    Stuart

    01/08/2022, 9:38 PM
    Hi guys has anyone used a mixture of next.js middleware and supabase to prevent unauthenticated users accessing pages?
  • o

    oliviercp

    01/08/2022, 10:32 PM
    Hi! Is it safe to update the search() fonction on the storage schema? Because i would need to add a created_by column, but the search function with is used but the sdk list() function only returns predefined columns. Or is there another work around for this without having to edit the storage schema? Thanks!
  • m

    Michael Ketzer | streamgeist.com

    01/09/2022, 7:43 AM
    Hey, you basically want to checkout this example: https://github.com/supabase/supabase/tree/master/examples/nextjs-with-supabase-auth As the default cookie lifetime is only about 8 hours (if I remember correctly), you may want to initialize your own GoTrue-client in the
    api/auth
    route. Checkout the
    profile
    route how to use the cookie in SSR. If you checkout the last image above i posted, that is actually one way to select rows as authenticated user with RLS. If this is the intended way, i don't know.
  • d

    dhruv_casa

    01/09/2022, 8:54 AM
    Is there a way to rollback changes to a table?
  • d

    dhruv_casa

    01/09/2022, 8:54 AM
    I deleted some rows by mistake
  • d

    dhruv_casa

    01/09/2022, 8:55 AM
    I'm on the free plan
  • v

    VuNguyen

    01/09/2022, 9:17 AM
    I can't figure out what's wrong here, I want to remove
    manga
    rows that don't have any
    chapters
    row
  • t

    tourdownunder

    01/09/2022, 9:29 AM
    You can't join with a delete statement. If you copied the code and not the screen shot I'd give you the exact query though instead I'll take a guess
    Copy code
    sql
    DELETE FROM manga WHERE id in (SELECT id from manga m inner join chapters c ON c.manga_id = m.id where c.foo = 'bar')
    I saw that you had a left join. Don't do that in this case
  • c

    chipilov

    01/09/2022, 10:47 AM
    Does anyone know which Postgres role is used when the GoTrue server connects to the Postgres DB? I am getting errors on signUp/signIn like 'Database error finding user' and 'Database error querying schema' which seems to indicate that the GoTrue either cannot connect to the db OR for some reason cannot access the auth.users table (the table itself is NOT missing, I can see it via the Dashboard and other SQL clients)
  • c

    chipilov

    01/09/2022, 10:50 AM
    Looks like it's using the postgres user: https://github.com/supabase/supabase/discussions/3440
  • l

    logemann

    01/09/2022, 10:54 AM
    you can do this invite thing only server side because you certainly dont want to store the servicekey in the frontend.
  • v

    VuNguyen

    01/09/2022, 11:15 AM
    Thank you, if I want to delete
    manga
    rows that don't have any
    chapters
    rows. Is this the right way?
    Copy code
    sql
    DELETE FROM manga WHERE id in (SELECT id from manga m inner join chapters c ON c.manga_id = m.id where c.chapter_id is null)
  • t

    tourdownunder

    01/09/2022, 11:59 AM
    Yes that seems right.
  • w

    wsh4and

    01/09/2022, 12:15 PM
    Why can't I make a project? I am the owner of the organization
  • d

    davidML

    01/09/2022, 12:16 PM
    had the same issue had to delete and create new organization looks like bug in new accounts
  • w

    wsh4and

    01/09/2022, 12:22 PM
    Yes, I had to create a new org and then create the project immediately. Can someone at Supabase fix this? Really bad UX
  • v

    VuNguyen

    01/09/2022, 12:31 PM
    Thank you, I'll give it a try
  • o

    oliviercp

    01/09/2022, 1:32 PM
    Hi! Is it safe to update the search() fonction on the storage schema? Because i would need to add a created_by column, but the search function with is used but the sdk list() function only returns predefined columns. Or is there another work around for this without having to edit the storage schema? Thanks!
  • n

    nananananate

    01/09/2022, 4:46 PM
    I usually have to log back in
  • c

    chipilov

    01/09/2022, 4:50 PM
    Does anyone know what is the duration of the tokens sent for email signup confirmation? Is it the same duration as the regular signed-in tokens?
  • n

    nananananate

    01/09/2022, 4:59 PM
    I created 2 projects, deleted 1, and now I can't make another project under Free Tier. Has anyone ran into this before?
    c
    • 2
    • 3
  • t

    thecoderatekid

    01/09/2022, 5:05 PM
    I everyone I need some help I am trying to use the storage API and it seems to have a bug no matter what I do when trying to move an item "/object/move" { "statusCode": "23503", "error": "Key is not present in table \"buckets\".", "message": "insert or update on table \"objects\" violates foreign key constraint \"objects_bucketId_fkey\"" }
  • d

    davidML

    01/09/2022, 5:50 PM
    Hi I'm new to cloudflare and cretaing my first table I am seeing "User defined Enumerated Types" where I can see
    equality_op
    and
    action
    where can I find some info about all of this?
  • d

    Devlooper

    01/09/2022, 6:13 PM
    Hey guys! I im need of a little help here, i got this query thats using .rangeAdjacent() on it, but i get a typescript error that says
    Argument of type 'string[]' is not assignable to parameter of type 'string'
    , what in the world is wrong? The selectedPriceRange variable is of type
    string[]
    . But if i hard code the value in .rangeAdjacent to for example .rangeAdjacent('price', [100, 200]) i get a 404.
  • r

    rcssdy

    01/09/2022, 7:30 PM
    hey guys, i've got supabase set up with my remix app.. but for some reason doing:
    Copy code
    const { error, data } = await supabase.from("jobs").select("*");
      return { data };
    isn't grabbing any data from the specified table (it's set up and has a single row of data) my supabase client is all set up correctly, I'm currently using it for authentication - so I'm not 100% sure as to why it's not returning any results, any help would be appreciated!
    j
    • 2
    • 54
  • j

    jensen

    01/09/2022, 8:09 PM
    supabae queries
  • m

    magpow

    01/09/2022, 9:56 PM
    will supabase work if the postgres db doesn't have the pgjwt extension enabled?
  • r

    rcssdy

    01/09/2022, 10:09 PM
    I haven't explicitly enabled pgjwt, and everything works for me 🙂
  • m

    magpow

    01/09/2022, 10:46 PM
    okay, that makes a bit of hope. thanks for your response!
1...188189190...316Latest