Sha256: 4b69f5dc680a036585375c886b0f9115ed80e2c162518d836513a2bfe4a6cc02
Contents?: true
Size: 566 Bytes
Versions: 71
Compression:
Stored size: 566 Bytes
Contents
# frozen_string_literal: true class AddReferenceToInitiatives < ActiveRecord::Migration[5.2] class Initiative < ApplicationRecord self.table_name = :decidim_initiatives belongs_to :organization, foreign_key: "decidim_organization_id", class_name: "Decidim::Organization" include Decidim::Participable include Decidim::HasReference end def change add_column :decidim_initiatives, :reference, :string reversible do |dir| dir.up do Initiative.find_each(&:touch) end end end end
Version data entries
71 entries across 71 versions & 1 rubygems