3.28.4: Исправлена ошибка компиляции миграции
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m7s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m7s
This commit is contained in:
@@ -2827,7 +2827,7 @@ func (a *App) initAuthDB() error {
|
||||
// Apply migration 014: Make refresh tokens permanent (expires_at nullable)
|
||||
// This allows refresh tokens to never expire
|
||||
var isNullable string
|
||||
err = a.DB.QueryRow(`
|
||||
err := a.DB.QueryRow(`
|
||||
SELECT is_nullable
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = 'public'
|
||||
@@ -2836,8 +2836,8 @@ func (a *App) initAuthDB() error {
|
||||
`).Scan(&isNullable)
|
||||
if err == nil && isNullable == "NO" {
|
||||
// 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 {
|
||||
log.Printf("Warning: Failed to apply migration 014 (make expires_at nullable): %v", err)
|
||||
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", execErr)
|
||||
} else {
|
||||
log.Printf("Migration 014 applied: refresh_tokens.expires_at is now nullable")
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "play-life-web",
|
||||
"version": "3.28.3",
|
||||
"version": "3.28.4",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Reference in New Issue
Block a user