mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 18:22:46 +00:00
--bug=1052060 --user=王孝刚 【知识库】-同步Web站点知识库,同步状态的时间与当前时区不一致,晚8小时 https://www.tapd.cn/57709429/s/1651754
13 lines
583 B
SQL
13 lines
583 B
SQL
UPDATE "${table_name}"
|
|
SET status = reverse (
|
|
SUBSTRING ( reverse ( LPAD( status, ${bit_number}, 'n' ) ) :: TEXT FROM 1 FOR ${up_index} ) || ${status_number} || SUBSTRING ( reverse ( LPAD( status, ${bit_number}, 'n' ) ) :: TEXT FROM ${next_index} )
|
|
),
|
|
status_meta = jsonb_set (
|
|
"${table_name}".status_meta,
|
|
'{state_time,${current_index}}',
|
|
jsonb_set (
|
|
COALESCE ( "${table_name}".status_meta #> '{state_time,${current_index}}', jsonb_build_object ( '${status_number}', '${current_time}' ) ),
|
|
'{${status_number}}',
|
|
CONCAT ( '"', '${current_time}', '"' ) :: JSONB
|
|
)
|
|
) |