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.23.3 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.23.2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.23.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.23.1.rc1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.23.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.22.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.21.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.20.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.20.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.19.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.18.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.19.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.17.2 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.18.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.17.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.16.1 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.17.0 db/migrate/20181022090732_add_columns_to_pages.rb
decidim-core-0.16.0 db/migrate/20181022090732_add_columns_to_pages.rb