Sha256: b2fb6f1ba66907065ef4845913eb7c79bc90644126d91595b4952f3e1c06dbc8
Contents?: true
Size: 879 Bytes
Versions: 53
Compression:
Stored size: 879 Bytes
Contents
# frozen_string_literal: true class RenameMaximumVotesPerProposalToThresholdPerProposal < ActiveRecord::Migration[5.1] def up execute <<~SQL.squish UPDATE decidim_components SET settings = jsonb_set( settings::jsonb, array['global'], (settings->'global')::jsonb - 'maximum_votes_per_proposal' || jsonb_build_object('threshold_per_proposal', settings->'global'->'maximum_votes_per_proposal') ) WHERE manifest_name = 'proposals' SQL end def down execute <<~SQL.squish UPDATE decidim_components SET settings = jsonb_set( settings::jsonb, array['global'], (settings->'global')::jsonb - 'threshold_per_proposal' || jsonb_build_object('maximum_votes_per_proposal', settings->'global'->'threshold_per_proposal') ) WHERE manifest_name = 'proposals' SQL end end
Version data entries
53 entries across 53 versions & 1 rubygems