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
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Denver James Duran
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
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Hello, I’m Allie!
Use the database_id field On the Pages Dev command wrangler pages dev —d1 DB=1476805e-7b64-4922-90c5-003d06f3bd36
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Hello, I’m Allie!
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
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Hello, I’m Allie!
What does Pages Dev output? For the bindings section
Want results from more Discord servers?
Add your server