Why the sql code injection stopped working on prompts?

So basically what the title is saying. A couple of weeks ago if i told v0 to create a new table into my supabase data base would give me a proper instructions on what to do and at the end gave me a sql panel to press create. Now even if i tell the prompt to do it, it just gives me a copy and paste instructions more than doing it itself

1 Like

Hi, @6h0t!

Are you still seeing this issue? I don’t see anything that changed from our side.

As usual, any chat links would be helpful.

Hi, yes im still facing this problem, as showed in the video, i even directly tell to the prompt to inject the code in the chat but gives me weird results as showed. Even the things it make does not work, as showed in the video, i cannot even run the sql components it gives showing errors on variables that are actually working.

i can share the link https://v0.dev/chat/fork-of-eterealconquest-9WINyBsgrbj#gStKjc470m9Mjytwow9z5Ryfpz9tDIns but i cannot make it public because has a lot of sensitive information.

This happened to me today.

the fix for this is asking to ```sql type=“inline-sql”’ when prompting for sql injection to actualy prompt u the component

1 Like

When I first connected SupaBase, v0 executed in queries for table creation and configuration. Then after several more prompts all the sudden I realized the front end error I was getting was because the back end table had not been created.

In troubleshooting, v0 generated SQL scripts, but wouldn’t run them. Many of them worked if I cut and paste them into the SQL console SupaBase.

Is there something I’m doing wrong from a prompting perspective that v0 itself and allowed back end to fall behind?

This is all within a single day and I haven’t changed environments or anything like that. Environmental variables have been set and not messed with either.

Hey, @ckworkshop! I moved your topic to this one that @6h0t started as it’s related. :smiley: Does the solution work for you?

The stated solution didn’t work for me.

Here’s what I prompted:
"Create and run a SQL query for all tables and fields to refresh agent knowledge of the data model.
sql type=“inline-sql” "

Result:
v0 created an SQL file, but it didn’t offer the option to run it inline with the expected “Run Script” button.

– Follow up –
I was able to follow up with: run the script. "SQL Type = “inline-sql” "
And response was closer to what I expected.
Response:
Added context (1 file)
Thought for some time
Let’s run the database schema analysis script:
→ Displayed script in box with button ‘run script’

I couldn’t get it to offer to run the script before when the ‘run script’ button disappeared. It just kept re-writing the script.

What prompt would you recommend to not have to prompt several times to get it to run the script?

probably because of the iteration u are working on, try forking then press crtl + f5 and then run the prompt again and it will run. Im running on iteration 30 and works flawlessly, it can even give u the sql u already executed in the past.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.