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

    stibbs

    09/06/2021, 1:00 AM
    If you want to make use of an updatedAt data point, yes
  • s

    stibbs

    09/06/2021, 1:01 AM
    updatedAt timestamp with time zone default timezone('utc'::text, now()) not null
  • w

    waptik

    09/06/2021, 1:01 AM
    i updated my columns in the comment. I have
    updatedAt
    but not
    updatedat
  • s

    stibbs

    09/06/2021, 1:02 AM
    change your query to look for
    updatedAt
    instead of
    updatedat
  • j

    JoshTheNerd

    09/06/2021, 1:04 AM
    Helping is fun 😄
  • w

    waptik

    09/06/2021, 1:04 AM
    where do i do that? i use the js-client all the time for crud ops. Just tried the ui to check if i'd get the same response
  • s

    stibbs

    09/06/2021, 1:05 AM
    Share the query you are running that results in that error
  • w

    waptik

    09/06/2021, 1:07 AM
    I don't run any sql query per say. Only using js-client methods. Here's how i do it:
    Copy code
    ts
    async updateUserAccount(user: Partial<User>, id: string) {
            try {
                const { error: supaError } = await supabase
                    .from<User>("users")
                    .update(user, {
                        returning: "minimal",
                    })
                    .match({ id });
    
                if (supaError) {
                    throw supaError;
                }
    
                return true;
            } catch (error) {
                captureException(error, {
                    tags: {
                        from: "[Database.createUserAccount]",
                        description: error.message,
                    },
                });
                throw error;
            }
        }
  • s

    stibbs

    09/06/2021, 1:09 AM
    What's in the
    user
    you are passing to
    updateUserAccount/2
    ?
  • w

    waptik

    09/06/2021, 1:12 AM
    type definitions for https://discord.com/channels/839993398554656828/843999948717555735/884240481800822784 . Currently, i'm calling updating the table with the following data:
    await updateUserAccount({paystackSubaccountId: "ACCT_XXXXXX"}, "some-valid-uuid-for-user")
  • s

    stibbs

    09/06/2021, 1:18 AM
    That's what the table is expecting, I want to see what you are actually sending in your code
  • s

    stibbs

    09/06/2021, 1:19 AM
    So you pass it an object with only
    paystackSubaccountId
  • w

    waptik

    09/06/2021, 1:20 AM
    for now, only
    paystackSubaccountId
    .
  • s

    stibbs

    09/06/2021, 1:20 AM
    When you added the
    updatedAt
    column, how did you do that?
  • s

    stibbs

    09/06/2021, 1:21 AM
    Maybe below is trying to hit updatedat 🤔
    Copy code
    javascript
    .update(user, {
      returning: "minimal",
    })
  • w

    waptik

    09/06/2021, 1:21 AM
    I used the dashboard(old ui)
  • w

    waptik

    09/06/2021, 1:22 AM
    I don't think that's the issue because i face the same issue when i update
    paystackSubaccountId
    from the dashboard
  • s

    stibbs

    09/06/2021, 1:22 AM
    That would be performing a similar query, just with a pretty front-end
  • s

    stibbs

    09/06/2021, 1:23 AM
    updating the record is trying to update a column that doesn't exist
  • s

    stibbs

    09/06/2021, 1:23 AM
    as a hacky check, rename the
    updatedAt
    column to
    updatedat
    and see if the error is the same
  • w

    waptik

    09/06/2021, 1:24 AM
    I think i found the issue. It might be a bug from supabase. I replaced
    updatedAt
    to
    updatedat
    then changed value of
    paystackSubaccountId
    and it was saved without any issue
  • p

    Peanut

    09/06/2021, 1:39 AM
    Anyone have issues with error
    JWTIssuedAtFuture
    when creating JWTs? Basically I have a Firebase Function that issues a JWT for my users so they can query my Supabase DB. I am running my function locally on my machine in WSL. Apparently WSL has an issue with clock drift. Is it maybe possible to disable that expiry check in Supabase? I am using a test project so dont care about this stuff (only in prod)
  • p

    Peanut

    09/06/2021, 2:52 AM
    [for now I have turned off setting a creation date only in development]
  • m

    Michael Ketzer | streamgeist.com

    09/06/2021, 6:17 AM
    Hey there, I am using RLS and have it enabled all over. However, when I got no session, it returns all data. This shouldn't be happening, or should it? As soon as I am logged in, I only see data that is applying the RLS. I am USING
    (uid() = user_id)
    + WITH CHECK
    (role() = 'authenticated':: text)
    .
  • j

    jason-lynx

    09/06/2021, 7:10 AM
    try removing the
    WITH CHECK
    ?
  • p

    patrik

    09/06/2021, 8:04 AM
    I am at a place where I absolutely love RLS but somehow I'm also afraid I fuck it up, is there a tool or something to visualize all policies or right test for them or anything? what is the best practice here?
  • m

    Michael Ketzer | streamgeist.com

    09/06/2021, 11:04 AM
    Tried that, same result… I tried moving it as AND condition into the USING check which also does not work…
  • s

    silentworks

    09/06/2021, 11:48 AM
    This should probably be stated somewhere in the supabase docs, but don't use any other case than lowercase and underscores in table, column, function, view names. So instead of
    updatedAt
    use
    updated_at
    .
  • a

    Andy | Spillhosting.no

    09/06/2021, 12:01 PM
    Hey, i keep getting more and more failed requests to supabase, is there anything i can do to fix this? (I had a few errors daily before but the last 10hours i have gotten way more)
    Copy code
    FetchError: request to SUPABSEURL failed, reason: getaddrinfo ENOTFOUND URL
    0|server  |     at ClientRequest.<anonymous> (/root/games/node_modules/cross-fetch/node_modules/node-fetch/lib/index.js:1461:11)
    0|server  |     at ClientRequest.emit (node:events:394:28)
    0|server  |     at TLSSocket.socketErrorListener (node:_http_client:447:9)
    0|server  |     at TLSSocket.emit (node:events:394:28)
    0|server  |     at emitErrorNT (node:internal/streams/destroy:157:8)
    0|server  |     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    0|server  |     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
    0|server  |   type: 'system',
    0|server  |   errno: 'ENOTFOUND',
    0|server  |   code: 'ENOTFOUND'
    0|server  | }
  • t

    Thomas B

    09/06/2021, 12:05 PM
    Would be cool. :p Tell me if you find something haha.
1...757677...316Latest