Genio
Genio
Explore posts from servers
BABetter Auth
Created by Genio on 4/16/2025 in #help
No mention of callback url in docs for Apple
I am adding social sign in and already added entra and google. However with apple, it works and i am getting the prompt to sign in with them however after that is done i get error
{"code":"INVALID_ORIGIN","message":"Invalid origin"}
{"code":"INVALID_ORIGIN","message":"Invalid origin"}
There was no redirect url explanation in the docs so i assumed it would be
https://domain/api/auth/callback/apple
https://domain/api/auth/callback/apple
and added it to the redirect urls in apple's service But... i think thats wrong? cause my redirection keeps erroring out with Invalid origin. Is there a step i am missing to why there isnt a redirect url? Thank you 🙏
11 replies
DTDrizzle Team
Created by Genio on 4/4/2025 in #help
Drizzle push not respecting .existing views. Have to drop the view everytime i change schema
Like the title says, everytime i change my schema and push it via npx drizzle-kit push. It prompts me to drop the view table.
export const eventStatsView = pgView("inve_event_stats_view", {

}).existing();
export const eventStatsView = pgView("inve_event_stats_view", {

}).existing();
so whenever i push schema changes drizzle doesnt prompt me to drop the table to make changes. However, even after putting the view in my schema.ts, whenever i push i still get a prompt to drop the view!
➜ INVE git:(development) ✗ npx drizzle-kit push
drizzle-kit: v0.21.4
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Users/genio/Developer/INVE-APPS/INVE/INVE/drizzle.config.ts'
Using 'postgres' driver for database querying
+ INVE_event_messages table will be created
+ INVE_qr_guests_entry table will be created
--- all table conflicts resolved ---

Warning Found data-loss statements:
· You're about to delete inve_event_stats_view table with 46 items

THIS ACTION WILL CAUSE DATA LOSS AND CANNOT BE REVERTED

Do you still want to push changes?
[x] All changes were aborted
➜ INVE git:(development) ✗ npx drizzle-kit push
drizzle-kit: v0.21.4
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Users/genio/Developer/INVE-APPS/INVE/INVE/drizzle.config.ts'
Using 'postgres' driver for database querying
+ INVE_event_messages table will be created
+ INVE_qr_guests_entry table will be created
--- all table conflicts resolved ---

Warning Found data-loss statements:
· You're about to delete inve_event_stats_view table with 46 items

THIS ACTION WILL CAUSE DATA LOSS AND CANNOT BE REVERTED

Do you still want to push changes?
[x] All changes were aborted
Because the view is complex, i created it in the database directly via SQL. Then in drizzle i should just say its existing and it shouldnt care about it and ignore it right? But that doesnt seem to be the case, so how can i instruct drizzle to trust me and just ignore it haha I would appreciate it if i could get a calrafication on how to properly handle this. Thank you
1 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
I keep getting this error when i run drizzle-kit push. I dont know if it has anything to do with my schema
> drizzle-kit push

drizzle-kit: v0.21.4
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/drizzle.config.ts'
Using 'postgres' driver for database querying
[⣽] Pulling schema from database.../Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/node_modules/drizzle-kit/bin.cjs:16161
const columnDefaultAsString = column7.column_default.toString();
^

TypeError: Cannot read properties of undefined (reading 'toString')
at defaultForColumn (/Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/node_modules/drizzle-kit/bin.cjs:16161:60)
at /Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/node_modules/drizzle-kit/bin.cjs:15992:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
> drizzle-kit push

drizzle-kit: v0.21.4
drizzle-orm: v0.30.10

No config path provided, using default path
Reading config file '/Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/drizzle.config.ts'
Using 'postgres' driver for database querying
[⣽] Pulling schema from database.../Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/node_modules/drizzle-kit/bin.cjs:16161
const columnDefaultAsString = column7.column_default.toString();
^

TypeError: Cannot read properties of undefined (reading 'toString')
at defaultForColumn (/Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/node_modules/drizzle-kit/bin.cjs:16161:60)
at /Users/genio/Developer/INVE-APPS/INVE-API/kfupm-global-todo/node_modules/drizzle-kit/bin.cjs:15992:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
17 replies