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

Version Path
decidim-initiatives-0.29.1 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.28.4 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.27.9 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.29.0 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.28.3 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.27.8 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.29.0.rc4 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.29.0.rc3 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.29.0.rc2 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.29.0.rc1 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.28.2 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.27.7 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.28.1 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.27.6 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.26.10 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.26.9 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.28.0 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.27.5 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.28.0.rc5 db/migrate/20181211112538_add_reference_to_initiatives.rb
decidim-initiatives-0.28.0.rc4 db/migrate/20181211112538_add_reference_to_initiatives.rb