Sha256: 2a5e6b1c583cae105d066d67bde8f15d083713b71dc8120dd7aebcb8d2a86ec3

Contents?: true

Size: 611 Bytes

Versions: 58

Compression:

Stored size: 611 Bytes

Contents

# frozen_string_literal: true

class AddColumnsToPages < ActiveRecord::Migration[5.2]
  class StaticPage < ApplicationRecord
    self.table_name = :decidim_static_pages
  end

  # rubocop:disable Rails/SkipsModelValidations
  def change
    change_table :decidim_static_pages do |t|
      t.column :weight, :integer, default: nil, null: true
      t.column :show_in_footer, :boolean, default: false, null: false
    end

    Decidim::StaticPage.where(
      slug: ["faq", "terms-and-conditions", "accessibility"]
    ).update_all(show_in_footer: true)
    # rubocop:enable Rails/SkipsModelValidations
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-core-0.27.9 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.8 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.7 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.6 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.10 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.9 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.5 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.8 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.4 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.3 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.7 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.5 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.4 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.3 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.0.rc2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.27.0.rc1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.2 db/migrate/20181022090732_add_columns_to_pages.rb