Sha256: 8d6c2157b649d0cb1d83ff86b6bddd6d0351b8ea6be8b76ebdd284c4f0884f57
Contents?: true
Size: 865 Bytes
Versions: 38
Compression:
Stored size: 865 Bytes
Contents
# frozen_string_literal: true class RenameMaximumVotesPerProposalToThresholdPerProposal < ActiveRecord::Migration[5.1] def up execute <<~SQL 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 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
38 entries across 38 versions & 1 rubygems