Use isTest flag for PayU base URL
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s

This commit is contained in:
androidlover5842
2026-01-30 06:05:35 +05:30
parent 91a45d62e8
commit d1f98c8cb1
5 changed files with 37 additions and 5 deletions

View File

@@ -28,11 +28,25 @@ class PayuSettingsSchemaFix(
salt_32 varchar,
salt_256 varchar,
base_url varchar not null,
is_test boolean not null default false,
use_salt_256 boolean not null default true,
updated_at timestamptz not null
)
""".trimIndent()
)
}
val hasIsTest = jdbcTemplate.queryForObject(
"""
select count(*)
from information_schema.columns
where table_name = 'payu_settings'
and column_name = 'is_test'
""".trimIndent(),
Int::class.java
) ?: 0
if (hasIsTest == 0) {
logger.info("Adding payu_settings.is_test column")
jdbcTemplate.execute("alter table payu_settings add column is_test boolean not null default false")
}
}
}