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

    SnappierSoap

    07/09/2022, 7:05 AM
    Hey can we use email authentication with RESTApi?
    n
    o
    • 3
    • 2
  • o

    Omega

    07/09/2022, 9:17 AM
    Does the hosted version of Supabase support RLS with realtime subscriptions? Cause every time I turn RLS on it stop's working even tho all access is granted and the socket is created + the subscription is listed in the DB.
    n
    g
    • 3
    • 4
  • m

    mshadow

    07/09/2022, 4:15 PM
    Hey guys! I'm trying to implement something, which relies on user presence in a "room" - they must appear in the list when joining and disappear once left. There is no problem with the first part but totally cannot figure out how to make the second one. In a perfect world there would be a possibility to trigger DB change on closing realtime session - that seems impossible now, is it? I've also spent hours trying to make it work using
    beforeunload
    /
    unload
    browser events - to send PATCH to the API and update users list - they are so unreliable and work inconsistently in different browsers, so no luck. Has signed up on multiplayer.dev already, but not sure that would be a quick thing to let me in 🙂 Would really appreciate any help, thanks!
    n
    g
    • 3
    • 3
  • y

    yolo

    07/09/2022, 6:55 PM
    Hey guys,So I implemented user persistence (using recoversession function)but it only works for about an hour. Any tips on how to increment this time. I want auth persistence to last 7 days before redirecting to login page again
    n
    • 2
    • 2
  • b

    BartWestenenk

    07/09/2022, 8:00 PM
    Is there somewhere a documentation file to find which error should be given under which conditions?
    n
    g
    • 3
    • 4
  • n

    Nin

    07/09/2022, 9:01 PM
    Whenever I try to add columns to my table in Supabase I get the error
    Cannot read properties of undefined (reading 'tables')
    what do I do?
    n
    s
    • 3
    • 4
  • r

    revanthp

    07/09/2022, 9:56 PM
    I am trying to query tables that have a many-to-many relationship established via a third table. However, when I try to embed the values of the second table, it fails stating that there is no relationship between the two of them. Here is the client code I am using:
    Copy code
    js
    const { data: profile, error } = await supabase
        .from('details')
        .select('*, classes (*)')
    The first table is called details and the second table is called classes. They are connected by a third table called enrollments, which has an id, details_id, and class_id.
    n
    g
    • 3
    • 8
  • 🆕 AlexXi (2022-07-09)
    n

    Needle

    07/09/2022, 10:20 PM
    Hello @AlexXi! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! 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.
  • r

    revanthp

    07/09/2022, 11:52 PM
    Is there any way to perform with on the server side? For example, is it possible to sign in a user through NextJS’s API routes?
    n
    o
    • 3
    • 17
  • t

    Tocas

    07/10/2022, 2:13 AM
    I found out that you can edit the ID column of tables using API, even though it should be the primary column and it should identify the entire row. Is there any way to prevent this? I know you can freeze column for the UI, but that doesn't stop people from editing it via API.
    n
    o
    s
    • 4
    • 14
  • k

    konga

    07/10/2022, 3:36 AM
    Is there any way to use the config.toml file to modify the production version of Supabase? This is the local version. We have a staging and production database and we want to have a consistent dev environment from local to staging to prod.
    n
    s
    • 3
    • 2
  • a

    and3rsonsousa

    07/10/2022, 7:20 AM
    How can I use unaccent() with .ilike()?
    n
    s
    o
    • 4
    • 5
  • u

    unknown1337

    07/10/2022, 9:23 AM
    Is there a way to perform JOINS using the supabase CURL REST api *(Note: need CURL due to platform limitations)? *
    n
    s
    • 3
    • 7
  • k

    kapsonfire

    07/10/2022, 10:40 AM
    Hey I never used firebase/supabase, but I like the idea of subscriptions and so on. I'm stuck on the pricing modell? Can I host a own "Supabase" Server to eliminate the costs? So its free at all? How should I use supabase? Clients subscribe to new inserts and insertion and so on is used on server to validate?
    n
    u
    m
    • 4
    • 9
  • STILLWATER; (2022-07-10)
    n

    Needle

    07/10/2022, 12:47 PM
    Hello @STILLWATER;! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! 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.
    s
    • 2
    • 2
  • g

    gjavilae

    07/10/2022, 1:47 PM
    Hi everybody. I not know if this be the correct channel for my qustion, but, how to can create a new project when i'm using supabase docker-compose method deploy locally?? I want keep all my clients in separated projects
    n
    s
    • 3
    • 4
  • g

    glomyst

    07/10/2022, 3:28 PM
    👐React query👐
    n
    o
    a
    • 4
    • 5
  • Andy | MGG Studio (2022-07-10)
    n

    Needle

    07/10/2022, 5:52 PM
    Hello @Andy | Spillhosting.no! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! 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.
    j
    a
    • 3
    • 3
  • z

    zAwie

    07/10/2022, 6:25 PM
    Hi all anyone else experiencing connecting to projects and got this error
    could not open file "global/pg_filenode.map": Input/output error
    ?
    n
    s
    • 3
    • 7
  • g

    ghostdragon

    07/10/2022, 6:44 PM
    Hi @zAwie I am yes. It seems my Daily Disk IO Budget remaining is 0% now, but I have no idea how
    n
    s
    • 3
    • 2
  • z

    zAwie

    07/10/2022, 6:47 PM
    Yeah same never had this before
    n
    s
    • 3
    • 3
  • r

    Riotgear66

    07/10/2022, 7:11 PM
    With RLS policies, is there a way to only allow certain fields to be modified?
    n
    o
    +2
    • 5
    • 11
  • k

    Kariak

    07/10/2022, 9:24 PM
    Hey ya'll, was curious if I'm thinking about a solution I'm building correctly. I'm using Nextjs to build a sports app with multiple 3rd party apis for live sports. Those apis don't have websockets or push functionality. They only allow polling every 5+ seconds. I was thinking I might build a node app that polls the apis then if there's a difference in the current row in supabase compared to the api result, update that row and use a supabase realtime connection to update the FE. Am I architecting this right or missing something? Would it be possible to use cloud functions or Next to handle the polling every 5 seconds on the server?
    n
    s
    r
    • 4
    • 9
  • r

    Ratl94

    07/11/2022, 5:14 AM
    Hello guys, I'm trying to do a text search on different columns and tables at the same time, is that possible to do from the client side? in this case from flutter
    n
    j
    • 3
    • 2
  • m

    Monyo

    07/11/2022, 6:04 AM
    Hello, I'm new in using Supabase. Just trying to learn how to populate table from user input. I'm trying to insert a row into a table from frontend's user's input... My columns are id,
    createdAt, drakeQuote, inAppearance
    It's not inserting rows to it. This is my function that's supposed to insert into the table
    Copy code
    async function createQuote() {
            await supabase
                .from('quotes')
                .insert([
                    { drakeQuote, inAppearance }
                ])
                .single()
            setQuote({ drakeQuote: '', inAppearance: '' })
            fetchQuotes()
        }
    
     <form className='flex flex-col gap-4 w-full mt-5 justify-center items-center' onSubmit={createQuote}>
                        <input
                            value={drakeQuote}
                            placeholder='Drake quote'
                            type='text'
                            className='outline-none placeholder:text-gray-400 w-full px-2 py-1 text-gray-600'
                            onChange={(e) => setQuote({ ...quote, drakeQuote: e.target.value })}
                        />
                        <input
                            value={inAppearance}
                            placeholder='Appearance'
                            className='outline-none placeholder:text-gray-400 px-2 py-1 text-gray-600'
                            onChange={(e) => setQuote({ ...quote, inAppearance: e.target.value })}
                        />
                        <button className='bg-blue-500 py-2 px-3 rounded-md hover:bg-blue-600 text-gray-100'>Submit Quote</button>
                    </form>
    n
    l
    • 3
    • 25
  • a

    aegnog

    07/11/2022, 12:33 PM
    I was hoping for help regarding two high-level questions/issues that are preventing me from "going all in" on Supabase: migrations, and data-layer-included e2e testing. My problem with e2e testing is that I can't figure out how to create a "test db" with a "test smtp" server to check a full-stack e2e test suite which would test things like magic-link sign-up as well as todo creation/deletion, etc. I can see that the supabase-cli would let me do this locally (I haven't tried yet, though), but what about on CICD? Should CICD also spin up a "local" supabase? If I point it to a staging-env, how do I reset that staging env, including the SMTP server and the auth pg schema, etc.? Another aspect affecting my understanding of e2e testing is db migrations generally. Is there a "blessed" approach to this? When I spin up my testing environments, I will need (I assume) to run through a folder of sql migrations so the test db is in the right shape. Using the db-tables GUI to explore new data models is great, but I will need (I assume) a migrations folder so I have environment-agnostic consistency for testing purposes, as well as system robustness, etc Any advice? Still new to supabase, so sorry if I missed obvious docs somewhere 🙏
    n
    j
    • 3
    • 3
  • i

    inspiration101

    07/11/2022, 1:35 PM
    Hello, does Supabase's postgres support the XML functions?
    n
    s
    s
    • 4
    • 5
  • r

    Revxrsal

    07/11/2022, 2:47 PM
    o/ what's the ideal way to represent a structure like this? - each user can have multiple pages (each has a name) - the user can invite other users to their pages - a user can make their page public - a user can blacklist other users from seeing their public page i thought of multiple tables, one for
    pages
    , one for
    invites
    and one for
    blacklists
    , and in
    invites
    for example, for every invitation there will be an entry with the invited user's ID and the page's ID. though i'm not sure if this would work (as it would mean there will be duplicate columns). are there any better ways?
    n
    s
    • 3
    • 4
  • s

    Sophic

    07/11/2022, 3:33 PM
    I am getting a Cloudflare error originating somewhere in supabase. Can only share the logged html as its crashing sveltekit
    Copy code
    <h2 class="cf-subheadline" data-translate="error_desc">Worker threw exception</h2>
          </div><!-- /.header -->
    
          <section></section><!-- spacer -->
    
          <div class="cf-section cf-wrapper">
            <div class="cf-columns two">
              <div class="cf-column">
                <h2 data-translate="what_happened">What happened?</h2>
                <p>You've requested a page on a website (myurl.supabase.co) that is on the <a data-orig-proto="https" data-orig-ref="www.cloudflare.com/5xx-error-landing/" target="_blank">Cloudflare</a> network. An unknown error occurred while rendering the page.</p>
              </div>
    
              
              <div class="cf-column">
                <h2 data-translate="what_can_i_do">What can I do?</h2>
                <p><strong>If you are the owner of this website:</strong><br />you should <a data-orig-proto="https" data-orig-ref="www.cloudflare.com/login?utm_source=error_100x" target="_blank">login to Cloudflare</a> and check the error logs for myurl.supabase.co.</p>
              </div>
    n
    o
    +2
    • 5
    • 39
  • n

    NanoBit

    07/11/2022, 3:38 PM
    Hello! Has anyone successfully implemented Prisma to work with Supabase? It would be great if I could draw some insights on whether implementing Prisma has been worth it. I have been reading this past week on trying to get them to work together meeting several issues with workarounds. 1. No cross schema.
    auth.users
    cannot be accessed. We need to use a trigger to update a
    public.users
    table. 2. Creating that trigger in
    1
    requires a separate script run ourselves via
    psql
    . 3. Using any function like
    auth.id()
    requires a "fake" function
    public.auth_id()
    to be used in-place, then replaced via
    psql
    like
    2
    . 4. Incrementing ID primary key doesn't work .
    id BigInt @id @default(autoincrement())
    does not create auto increment properly. Issue: #7560 5. Grants are a bit messed up (See Troubleshooting section on Supabase docs) 6. Required to create a separate db user to not bypass RLS and to give grants 7. Required to use a Prisma middleware to inject the
    current_user_id
    for each transactions (with no official documentation on this, only other users' code) 8. We cannot add other schemas like the
    supa-audit
    extensions which uses the
    audit
    schema. 9. Current minor issues with quotes in name (although they might be solved soon) 10. Use separate connection string for migrate vs normal use with PgBouncer (supabase already provides this) 11. RLS has to be manually created unlike in Supabase where we can Supabase Studio 12. Telemetry? Set
    CHECKPOINT_DISABLE=1
    13. Need to
    CREATE SCHEMA IF NOT EXISTS "extensions";
    for UUID Up to this point, I am sure I have not discovered all the nitty gritty bugs still. Does anyone have any opinion or experience to share about using Prisma? I will also consolidate this info to one place to help future people facing these issues.
    n
    j
    • 3
    • 3
1...298299300...316Latest