Skip to content

Commit

Permalink
fix: disable prepared stmt for Supabase compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
harshit-jain52 committed Nov 17, 2024
1 parent dfa030b commit b99417e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ func GetDB() (db *gorm.DB, err error) {

dialector = postgres.Open(dsn)

db, err = gorm.Open(dialector, &gorm.Config{})
// Disable prepared statements if using Supabase
db, err = gorm.Open(dialector, &gorm.Config{
PrepareStmt: false,
})

if err != nil {
log.Err(err).Msg("Database open error.")
Expand Down

0 comments on commit b99417e

Please sign in to comment.