3.28.4: Исправлена ошибка компиляции миграции
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m7s

This commit is contained in:
poignatov
2026-01-25 15:54:06 +03:00
parent fe3721a56f
commit 34f162576b
3 changed files with 5 additions and 5 deletions

View File

@@ -1 +1 @@
3.28.3 3.28.4

View File

@@ -2827,7 +2827,7 @@ func (a *App) initAuthDB() error {
// Apply migration 014: Make refresh tokens permanent (expires_at nullable) // Apply migration 014: Make refresh tokens permanent (expires_at nullable)
// This allows refresh tokens to never expire // This allows refresh tokens to never expire
var isNullable string var isNullable string
err = a.DB.QueryRow(` err := a.DB.QueryRow(`
SELECT is_nullable SELECT is_nullable
FROM information_schema.columns FROM information_schema.columns
WHERE table_schema = 'public' WHERE table_schema = 'public'
@@ -2836,8 +2836,8 @@ func (a *App) initAuthDB() error {
`).Scan(&isNullable) `).Scan(&isNullable)
if err == nil && isNullable == "NO" { if err == nil && isNullable == "NO" {
// Column is NOT NULL, need to make it nullable // Column is NOT NULL, need to make it nullable
if _, err := a.DB.Exec("ALTER TABLE refresh_tokens ALTER COLUMN expires_at DROP NOT NULL"); err != nil { if _, execErr := a.DB.Exec("ALTER TABLE refresh_tokens ALTER COLUMN expires_at DROP NOT NULL"); execErr != nil {
log.Printf("Warning: Failed to apply migration 014 (make expires_at nullable): %v", err) log.Printf("Warning: Failed to apply migration 014 (make expires_at nullable): %v", execErr)
} else { } else {
log.Printf("Migration 014 applied: refresh_tokens.expires_at is now nullable") log.Printf("Migration 014 applied: refresh_tokens.expires_at is now nullable")
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "play-life-web", "name": "play-life-web",
"version": "3.28.3", "version": "3.28.4",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",