trying to fix qr
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
This commit is contained in:
@@ -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()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user