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

    user

    09/09/2021, 11:33 AM
    [need help with search] Hey guys, how I can get results when searching for e.g.
    klara
    so it would match a value
    Klára
    as well? Essentially making modified characters equal (
    á
    ~
    a
  • d

    Deleted User

    09/09/2021, 11:45 AM
    Maybe the "unaccent" extension would help? https://supabase.io/docs/guides/database/extensions#full-list-of-extensions
  • s

    Scott Prins

    09/09/2021, 1:48 PM
    Anyone available in the evenings that may be able to help me with some schema design? Backend/data modeling is not my strong suit
  • s

    silentworks

    09/09/2021, 2:09 PM
    What timezone are you in? as the evening varies for everyone.
  • s

    stefanjensen

    09/09/2021, 2:11 PM
    I accidentally send over a bunch of request via the Supabase JS Client, and think I've maybe hit an API Rate Limit, and got a timeout. I've tried searching for the Supabase rate limits, but unfortunately didn't find any - I currently can't access my tables within Supabase (Infinite loading screen) Does anybody know, if there's a hidden rate limit - and how long a timeout could vary?
  • s

    Scott Prins

    09/09/2021, 2:15 PM
    Mountain Standard Time, Boise ID area
  • s

    silentworks

    09/09/2021, 3:15 PM
    Not that I know of, but use the feedback widget in the dashboard to report the issue you are haviing.
  • s

    stefanjensen

    09/09/2021, 3:20 PM
    Thank you, I've just tried sending a ticket via the back-end 😄
  • v

    Volkan

    09/09/2021, 4:35 PM
    anyone else had problem with
  • v

    Volkan

    09/09/2021, 4:35 PM
    Copy code
    sql
    CREATE POLICY "policy_name"
    ON public.Todo
    FOR INSERT WITH CHECK (
      auth.role() = 'authenticated'
    );
  • v

    Volkan

    09/09/2021, 4:36 PM
    (true) nothing seems to work, but if i use
    all
    it works fine
  • v

    Volkan

    09/09/2021, 4:36 PM
    only issue is INSERT select,delete, all work fine
  • v

    Volkan

    09/09/2021, 4:37 PM
    i have done some complex stuff with
    SECURITY DEFINER;
    but this basic thing just doesn't work 🤔
  • v

    Volkan

    09/09/2021, 4:38 PM
    tried on multiple supabase instances as well (even self hosted)
  • v

    Volkan

    09/09/2021, 4:49 PM
    figured it out ish need to add {returning: 'minimal'}
  • w

    waptik

    09/09/2021, 5:09 PM
    Hey! Anyone can help with a sample code to use in creating a supabase function for rpc?
    s
    • 2
    • 19
  • s

    SHλKESPEλR ♂

    09/09/2021, 5:17 PM
    Hi Supabasers (is that what we call ourselves?), I just joined this discord. I am exploring Supabase as a possible solution for my company. I have a few questions related to the idea of eliminating the "backend" as implied by many docs (example: https://postgrest.org/en/v8.0/),. To be honest, I like that. The less code we write the better. But to be honest, I am debating with myself on whether this is possible or not. Here are my concerns: 1. How are Schema migrations expected to be handled? Usually, we have backend code that on boot runs migration scripts againts the DB. Since the backend code is bundled with the migration scripts we can make sure they never deviate. Without a backend how do you manage that? You simply have git repo with SQL scripts? 2. Since we have no backend, that means we need to write complex queries. Is the Javascript query dsl, provided by supabase, able handle complex queries (multiple joins, subqueries, summation of columns, etc..)? 3. Basically, what is your workflow? Thanks!
  • d

    drex

    09/09/2021, 6:41 PM
    can i add supabase to an api made using express js
  • w

    waptik

    09/09/2021, 7:17 PM
    yes, just install the npm package
  • d

    drex

    09/09/2021, 7:25 PM
    oh alr ty
    w
    • 2
    • 3
  • j

    jon

    09/09/2021, 9:50 PM
    hey all, I'm getting this error when upserting:
    there is no unique or exclusion constraint matching the ON CONFLICT specification
    here's the code:
    Copy code
    const { data: organization, error } = await supabase.from<definitions['organizations']>('organizations').upsert(
          {
            ...
          },
          {
            onConflict: 'angelList',
          },
        );
    I saw when creating the table in the UI I had the option to make columns unique. but now that it's created, it's not an option in the UI. I ran this in the sql console, but still not working:
    Copy code
    ALTER TABLE organizations 
    ADD CONSTRAINT organizations_unique UNIQUE ("angelList", "crunchbase", "domain", "linkedin");
    any help here?
  • j

    jason-lynx

    09/10/2021, 2:21 AM
    if you specify an upsert on
    angelList
    , then you also need a unique constraint on just that column (i think)
  • j

    jason-lynx

    09/10/2021, 2:24 AM
    your current constraint does not ensure that every row has a unique
    angelList
    (only ensures a unique combination of those 4 columns you specified). that seems like what the error message is saying
  • p

    Prodigy7kX

    09/10/2021, 2:43 AM
    Hi people, i have a database structured like this:
  • p

    Prodigy7kX

    09/10/2021, 2:45 AM
    I can fetch a specific event with all matches related to it with:
  • p

    Prodigy7kX

    09/10/2021, 2:46 AM
    how i can fetch the teams referenced in the team1 and team2 values?
  • p

    Prodigy7kX

    09/10/2021, 2:46 AM
    Idk if im being clear
  • r

    RichCorbs

    09/10/2021, 3:25 AM
    Try
    local_team1:teams!team1(*),local_team2:teams!team2(*)
    The "local" strings alias the results. The "!team1/!team2" strings tell which foreign key/relationship to use in the query.
  • p

    Prodigy7kX

    09/10/2021, 3:27 AM
    Will try this right now...
  • p

    Prodigy7kX

    09/10/2021, 3:28 AM
    you mean like this?
1...808182...316Latest