Skip to content

Fix PostgreSQL initialization by downgrading gorm#1071

Merged
zhenghaoz merged 2 commits intomasterfrom
PostgreDB
Oct 9, 2025
Merged

Fix PostgreSQL initialization by downgrading gorm#1071
zhenghaoz merged 2 commits intomasterfrom
PostgreDB

Conversation

@zhenghaoz
Copy link
Collaborator

Close #1070

@zhenghaoz zhenghaoz requested a review from Copilot October 9, 2025 12:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes PostgreSQL initialization issues by downgrading GORM and related dependencies. The changes address compatibility problems that were preventing proper PostgreSQL database initialization.

  • Downgraded GORM from v1.25.7 to v1.23.6 and related database drivers
  • Simplified PostgreSQL connection logic by removing pgx/v5 direct usage
  • Removed timezone conversion code that may have been causing issues

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

File Description
go.mod Downgraded GORM and database drivers, updated various dependency versions
storage/cache/database.go Simplified PostgreSQL connection by using otelsql.Open instead of pgx directly
storage/cache/sql.go Removed timezone conversion logic for timestamps
storage/data/database_test.go Added basic initialization test
Comments suppressed due to low confidence (1)

go.mod:1

  • Several golang.org/x/* package versions appear to be from future releases that may not exist yet. Please verify these versions are available or use known stable versions.
module github.com/gorse-io/gorse

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zhenghaoz zhenghaoz merged commit a3c1857 into master Oct 9, 2025
11 checks passed
@zhenghaoz zhenghaoz deleted the PostgreDB branch October 9, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PostgreDB Error - pq: got 1 parameters but the statement requires 0

2 participants