Sha256: 14a40d14fa539ee2d549f905c91692f43123a55d7d3c8e5bb6aa90e578c87e90

Contents?: true

Size: 316 Bytes

Versions: 3

Compression:

Stored size: 316 Bytes

Contents

class AddMaxUsesToPandaCMSTemplate < ActiveRecord::Migration[7.1]
  def change
    add_column :panda_cms_templates, :max_uses, :integer, null: true, default: nil
    add_column :panda_cms_templates, :pages_count, :integer, default: 0
    Panda::CMS::Template.find_by(name: "Homepage")&.update(max_uses: 1)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
panda-cms-0.7.3 db/migrate/20240317161534_add_max_uses_to_panda_cms_template.rb
panda-cms-0.7.2 db/migrate/20240317161534_add_max_uses_to_panda_cms_template.rb
panda-cms-0.7.0 db/migrate/20240317161534_add_max_uses_to_panda_cms_template.rb