Use isTest flag for PayU base URL
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 37s
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user