Sha256: 3f26a7f0e8df2718319c4f929c007f8ea56a67c42e539158c44a0c5ff338540f

Contents?: true

Size: 269 Bytes

Versions: 2

Compression:

Stored size: 269 Bytes

Contents

class IndexesAndDefaults < ActiveRecord::Migration
  def self.up
    change_column_default :pages, :show_in_nav, true
    add_index :pages, :ancestry
  end

  def self.down
    change_column_default :pages, :show_in_nav, nil
    remove_index :pages, :ancestry
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sushifish-0.9.6 lib/generators/sushi/templates/indexes_and_defaults.rb
sushifish-0.9.0 lib/generators/sushi/templates/indexes_and_defaults.rb