[PR #1013] [MERGED] fix: postgresql migration not working with other languages #921

Closed
opened 2026-02-25 23:35:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/1013
Author: @fmartingr
Created: 11/16/2024
Status: Merged
Merged: 12/11/2024
Merged by: @fmartingr

Base: masterHead: fix/migration-quotes


📝 Commits (10+)

  • 67d9a76 fix: word check on migration error
  • 674e79a refactor: Improve PostgreSQL migration error handling using error codes
  • b2a2dfc refactor: Improve PostgreSQL migration error handling and transaction management
  • 52d2289 refactor: Remove unused compareWordsInString function and its tests
  • f9c68a6 style: Clean up migrations.go imports and comments
  • 2a6c6de style: Fix gofmt formatting in migrations.go
  • 9e10396 chore: remove migrations_test file
  • 7b9f8d2 ci: address golangci-lint warning
  • 4ec2412 test: stop tests if creating database fails
  • 8aecb98 fix: ensure migration transaction is commited or rolled back

📊 Changes

4 files changed (+32 additions, -20 deletions)

View changed files

📝 .golangci.yml (+1 -1)
📝 internal/database/database_test.go (+1 -1)
📝 internal/database/migrations.go (+3 -1)
📝 internal/database/pg.go (+27 -17)

📄 Description

Fix an error for postgres migrations on different languages, checking for the error code from postgres instead of comparing strings.

Closes #996


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/1013 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 11/16/2024 **Status:** ✅ Merged **Merged:** 12/11/2024 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `fix/migration-quotes` --- ### 📝 Commits (10+) - [`67d9a76`](https://github.com/go-shiori/shiori/commit/67d9a7635eff126859c7238cdd87f8e870c5b439) fix: word check on migration error - [`674e79a`](https://github.com/go-shiori/shiori/commit/674e79affb52cdec024bb28edab45f3140db19a4) refactor: Improve PostgreSQL migration error handling using error codes - [`b2a2dfc`](https://github.com/go-shiori/shiori/commit/b2a2dfcf86e1cdbce96e9e2f897d6ef3295ff798) refactor: Improve PostgreSQL migration error handling and transaction management - [`52d2289`](https://github.com/go-shiori/shiori/commit/52d22892891cbb66eda6a9c0ed55eba4b11b5b45) refactor: Remove unused compareWordsInString function and its tests - [`f9c68a6`](https://github.com/go-shiori/shiori/commit/f9c68a66acb77560b7bcab14271fcaa209dee5b3) style: Clean up migrations.go imports and comments - [`2a6c6de`](https://github.com/go-shiori/shiori/commit/2a6c6deafb49bcc165fdc00a07c78be6ed76dd52) style: Fix gofmt formatting in migrations.go - [`9e10396`](https://github.com/go-shiori/shiori/commit/9e10396d9b0e38059f593db678109012caa7313a) chore: remove migrations_test file - [`7b9f8d2`](https://github.com/go-shiori/shiori/commit/7b9f8d23f8aa6805188acd4c190594e34a09941b) ci: address golangci-lint warning - [`4ec2412`](https://github.com/go-shiori/shiori/commit/4ec2412293e796f6b56b41ed10daf84e8f48c84e) test: stop tests if creating database fails - [`8aecb98`](https://github.com/go-shiori/shiori/commit/8aecb98355286120ab7f0ed38d38f002522d0595) fix: ensure migration transaction is commited or rolled back ### 📊 Changes **4 files changed** (+32 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `.golangci.yml` (+1 -1) 📝 `internal/database/database_test.go` (+1 -1) 📝 `internal/database/migrations.go` (+3 -1) 📝 `internal/database/pg.go` (+27 -17) </details> ### 📄 Description Fix an error for postgres migrations on different languages, checking for the error code from postgres instead of comparing strings. Closes #996 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#921
No description provided.