Sha256: 02c2f2f9b5467ef982a6ed55c238069923d1e4553dcbfbf0125e1ae02b29b099
Contents?: true
Size: 497 Bytes
Versions: 9
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true class AddAvailableAuthorizationsToOrganization < ActiveRecord::Migration[5.0] class Organization < ApplicationRecord self.table_name = :decidim_organizations end def change add_column :decidim_organizations, :available_authorizations, :string, array: true, default: [] workflows = Decidim::Verifications.workflows.map(&:name) Organization.find_each do |org| org.update_attributes!(available_authorizations: workflows) end end end
Version data entries
9 entries across 9 versions & 1 rubygems