Sha256: 2315dbd0d7f5505834ca1de2c1ae454f60448e6e90142fd1667941fac387c428

Contents?: true

Size: 942 Bytes

Versions: 88

Compression:

Stored size: 942 Bytes

Contents

# frozen_string_literal: true

class RenameFeaturesToComponentsAtAccountability < ActiveRecord::Migration[5.1]
  def change
    rename_column :decidim_accountability_statuses, :decidim_feature_id, :decidim_component_id
    rename_column :decidim_accountability_results, :decidim_feature_id, :decidim_component_id

    if index_name_exists?(:decidim_accountability_results, "index_decidim_accountability_results_on_decidim_feature_id")
      rename_index :decidim_accountability_results, "index_decidim_accountability_results_on_decidim_feature_id", "index_decidim_accountability_results_on_decidim_component_id"
    end

    if index_name_exists?(:decidim_accountability_statuses, "index_decidim_accountability_statuses_on_decidim_feature_id")
      rename_index :decidim_accountability_statuses, "index_decidim_accountability_statuses_on_decidim_feature_id", "index_decidim_accountability_statuses_on_decidim_component_id"
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
decidim-accountability-0.13.0 db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
decidim-accountability-0.12.1 db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
decidim-accountability-0.13.0.pre1 db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
decidim-accountability-0.12.0 db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
decidim-accountability-0.11.2 db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
decidim-accountability-0.12.0.pre db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
decidim-accountability-0.11.1 db/migrate/20180305133145_rename_features_to_components_at_accountability.rb
decidim-accountability-0.11.0.pre1 db/migrate/20180305133145_rename_features_to_components_at_accountability.rb