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.26.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.0.rc2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.26.0.rc1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.25.2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.25.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.25.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.25.0.rc4 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.25.0.rc3 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.25.0.rc2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.25.0.rc1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.24.3 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.23.6 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.24.2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.23.5 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.24.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.24.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.24.0.rc2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.23.4 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.24.0.rc1 db/migrate/20181022090732_add_columns_to_pages.rb