[#2622] Change sort to proper JSONB
This commit is contained in:
parent
68608307ad
commit
1419e9b73f
6 changed files with 6 additions and 9 deletions
|
@ -2,7 +2,8 @@ namespace :'2018_09_20_procedure_presentation_jsonb' do
|
|||
task run: :environment do
|
||||
ProcedurePresentation.update_all(
|
||||
<<~SQL
|
||||
displayed_fields = ('[' || ARRAY_TO_STRING(old_displayed_fields, ',') || ']')::JSONB
|
||||
displayed_fields = ('[' || ARRAY_TO_STRING(old_displayed_fields, ',') || ']')::JSONB,
|
||||
sort = (sort #>> '{}')::jsonb
|
||||
SQL
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue