Sha256: 8a8106e4d2cfd31cf948996884655cb734b3d9cd6f6b002a3b94bbe18cbe4a80
Contents?: true
Size: 475 Bytes
Versions: 90
Compression:
Stored size: 475 Bytes
Contents
# frozen_string_literal: true class AddOrganizationCustomReference < ActiveRecord::Migration[5.0] class Organization < ApplicationRecord self.table_name = :decidim_organizations end def change add_column :decidim_organizations, :reference_prefix, :string Organization.find_each do |organization| organization.update!(reference_prefix: organization.name[0]) end change_column_null :decidim_organizations, :reference_prefix, false end end
Version data entries
90 entries across 90 versions & 1 rubygems