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

    ben-wib

    10/06/2021, 10:26 PM
    Hey all πŸ™‚ I'm trying to migrate my supbase DB from cloud to my on-premise environment with no success does anyone have good tutrial for it?
  • s

    stibbs

    10/07/2021, 12:10 AM
    Is there a way to redirect to a specific route on login? Like, for dev it's http://localhost:3000 but could you make it http://localhost:3000/dashboard. The authorised redirect urls don't seem to do anything with routes?
  • s

    sudo killall windows

    10/07/2021, 12:34 AM
    can someone please help me in #894719731133722644? Really just want to solve my problem and get on with it lol
  • r

    riknieu

    10/07/2021, 3:48 AM
    I'm having trouble with migrations too
  • o

    omertoast

    10/07/2021, 4:01 AM
    hey guys, is there any way that i can add different scopes to discord oauth?
  • j

    Jaeden

    10/07/2021, 7:53 AM
    Ah of course. Thank you so much!
  • p

    philbookst

    10/07/2021, 10:58 AM
    hey, when upserting data using the js client - can i specify multiple colums for the onConflict event? 2 fields for example, 1x primary key and 1x a unique constraint
  • f

    frubalu

    10/07/2021, 2:47 PM
    I just upgraded from supabase-js v1.21.0 to v1.24.0, and am now receiving a breaking error on page load:
    Copy code
    ./node_modules/@supabase/supabase-js/src/lib/helpers.ts
    Module parse failed: Unexpected token (11:38)
    You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
    | }
    | 
    > export function stripTrailingSlash(url: string) {
    |   return url.replace(/\/$/, '')
    | }
    Is this a bug I should open with the repo? Edit: I downgraded to v1.23.0 - right before that function was introduced - and the error is gone now. I'll leave it here for the time being.
  • s

    seufernandez

    10/07/2021, 4:07 PM
    Hi!!πŸ‘‹πŸ‘‹ Anyone know a way to search through multiple column? I tried this below but has not worked haha πŸ˜…
  • u

    user

    10/07/2021, 4:09 PM
    Hi everyone, how are you? I have a problem calling rpc function "If a new function was created in the database with this name and arguments, try reloading the schema cache" How can I reload the schema cache?
  • j

    jbergius

    10/07/2021, 5:49 PM
    Hi! I'm developing an application using Supabase and I love it. Coming close to a production release and was thinking now would be a good time to set up a local environment for me to keep developing things when we go live. I've managed to set up a local development of the postgres database using the Supabase CLI and Docker. Is there a simple way to migrate over my tables from the Postgres databas that Supabase hosts to my local Postgres-db? ANSWER: Answering my own question if someone else is interested: I used pg_dump to take a dump of my postgres database that runs on Supabase with the following command:
    Copy code
    pg_dump \
      -h db.REF.supabase.co \
      -p 6543 \
      -U postgres --schema-only \
      --clean --if-exists --schema=public \
      > supabase_schema.sql
    The problem I had was that I had to specify port 6543, even thou my Supabase UI presented a different port.
  • r

    ramirez

    10/07/2021, 9:53 PM
    maybe you can use a front end for the database? like beaverdb, pgadmin or datagrip for dumping your db
  • n

    Null

    10/07/2021, 10:28 PM
    Copy code
    js
    const image = useRef()
    
    const file = image.current.files[0];
    const { data, error } = await supabase.storage.from("image-posts").upload(file, {
      cacheControl: "3600",
      upsert: false,
      });
    if (error) alert(error);
    I cant seem to upload an image to a storage bucket, i get the error "[object Object]".
  • n

    Null

    10/07/2021, 10:31 PM
    And the image reference is being used on a
    input type="file"
    .
  • m

    Mihai Andrei

    10/07/2021, 10:52 PM
    From what i know, you can login the user on the server, and send back the token to the frontend and store it in localstorage. The , with every request, you need to use the jwt secret to decode the token and check if it is still valid, then make the query to the db to send that specific data
    s
    r
    • 3
    • 8
  • j

    Jaeden

    10/07/2021, 11:59 PM
    Question. I’m a fairly new developer trying to wrap my head around things. I have a table with many items. For each item, I need to schedule a cron job. It needs to be@by item since this cron takes about 4-5 seconds per item. As it uses Puppeteer to scrape a value. Stack: Nuxt SSR with Supabase. Deployed on Vercel What would be the best way to go around this? I know it’s not directly Supabase related, but there are some smart folks in here :). Thx in advance.
  • a

    anand

    10/08/2021, 4:11 AM
    how do i run a query like
    SELECT DISTINCT name FROM users
    using supabase-js?
  • a

    anand

    10/08/2021, 4:12 AM
    as in I want to avoid any repetition of data
  • j

    jason-lynx

    10/08/2021, 7:00 AM
    might be wrong, but i dont think that's possible from supabase-js. you could create a postgres function that does that and call it with RPC
  • g

    gawlk

    10/08/2021, 7:55 AM
    They should really add a way to send a query, it seems that we can only do the most basics things right now
    e
    • 2
    • 4
  • j

    jason-lynx

    10/08/2021, 7:59 AM
    doing that would probably make the database susceptible to SQL injection
  • g

    gawlk

    10/08/2021, 8:00 AM
    It could be by an opt in basis
  • a

    anand

    10/08/2021, 8:36 AM
    ah alright, thanks
  • y

    YelloJello

    10/08/2021, 9:59 AM
    don't schedule the cron job for each item, set it to run in an interval, do whatever it is in concurrent batches or batches or just one after the other, depends on your resources and your expectation of how performant you want it to be. I didn't get what you meant by be@by item, but if you mean that each item has a very specific time when you should process it, then depending on whether or not you can control that time you could make sure that all your items follow a pattern ex: they'd only require processing every 5 mins. If you can't control it at all, try to find the lowest time gap between when the processing should happen and set the interval of the cron job to that period of time aka try to keep it at 1 cron job at best.
    j
    • 2
    • 5
  • j

    Jaeden

    10/08/2021, 10:23 AM
    Cron questions
  • o

    Opossible

    10/08/2021, 3:00 PM
    The GUI database tool feels very beta to me right now. For example, I have a simple table. I get a warning that no primary key is selected. I edit table, make the uid column the primary key. Operation completes successfully. I open the table again, for some reason changes not saved?
  • m

    Mihai Andrei

    10/08/2021, 3:10 PM
    Hello! Is it possible to enable RLS and only let authenticated users insert in your db without giving permission to get? I tried to add that, but if i don't add a read policy, it throws me
    Copy code
    new row violates row-level security policy for table "contact
  • g

    garyaustin

    10/08/2021, 3:29 PM
    You need to set the returning option to 'minimal' to stop the insert from also doing a select to send data back.
  • m

    Mihai Andrei

    10/08/2021, 3:55 PM
    Oh, i missed that in the documentation. Thanks a lot!
  • u

    user

    10/08/2021, 5:37 PM
    Hey, I'm using phone signin OTP without password to sign in on our app and I noticed that the max JWT expiry is 1 week. Is there a way to let a user keep making requests without having to verify their number every week?
1...103104105...316Latest