trying to fix qr
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s

This commit is contained in:
androidlover5842
2026-01-30 12:56:42 +05:30
parent 669ebf96e3
commit b4c119e8ad
5 changed files with 71 additions and 8 deletions

View File

@@ -31,10 +31,30 @@ class PayuQrRequestSchemaFix(
status varchar not null,
request_payload text,
response_payload text,
expiry_at timestamptz,
created_at timestamptz not null
)
""".trimIndent()
)
} else {
val hasExpiryAt = jdbcTemplate.queryForObject(
"""
select count(*)
from information_schema.columns
where table_name = 'payu_qr_request'
and column_name = 'expiry_at'
""".trimIndent(),
Int::class.java
) ?: 0
if (hasExpiryAt == 0) {
logger.info("Adding expiry_at to payu_qr_request table")
jdbcTemplate.execute(
"""
alter table payu_qr_request
add column expiry_at timestamptz
""".trimIndent()
)
}
}
}
}