Nevermind team, I found a workaround, so apparently, what causes the "not authorized" issue is that
Nevermind team, I found a workaround, so apparently, what causes the "not authorized" issue is that I am using TEMPORARY in creating the table, what I did to fix the problem was remove the TEMPORARY keyword then just DROPped the temp_stocks afterwards. this is fixed.. just a reference for anyone who might encounter it and for devs to find a fix for it if it isn't intended to behave that way..
8 Replies
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I just did this,
my script looks like this in case that you might wanna see
npx wrangler d1 execute myD1DatabaseName --local --file="./src/lib/server/d1/migrations/stocks.sql"
The myD1DatabaseName
is the database_name
in wrangler.toml
I don't know if this answers your inquiry...Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Use the database_id field
On the Pages Dev command
wrangler pages dev —d1 DB=1476805e-7b64-4922-90c5-003d06f3bd36
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Yeah, but Pages Dev can’t interact with production DBs anyway
It will always use a local version
So theoretically you could give it any ID you want
As long as it is set correctly in the dashboard
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
What does Pages Dev output?
For the bindings section