i am getting an error "env.DB.prepare(...).run is not a function" , i logged env.DB and it is undefi

i am getting an error "env.DB.prepare(...).run is not a function" , i logged env.DB and it is undefined,
in my controller i use it like this:

What did i do wrong here ?
Image_06-09-2023_at_3.27_PM.jpeg
Was this page helpful?