Sha256: 8a36b520c78bc8850a37b4bc24430e55c4108a2f0a775fe637fc35d8741ad543

Contents?: true

Size: 307 Bytes

Versions: 18

Compression:

Stored size: 307 Bytes

Contents

class AddRoleStringStrategy < ActiveRecord::Migration
  def self.up           
    change_table :<%= table_name %> do |t|
      t.string :role_string, :default => 'guest', :null => false
    end
  end

  def self.down
    change_table :<%= table_name %> do |t|
      t.remove :role_string
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
roles_active_record-0.5.1 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.5.0 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.9 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.8 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.7 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.6.4 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.6.3 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.6.2 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.6.1 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.6 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.5 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.4 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.3 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.2 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.1 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.4.0 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.3.6 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb
roles_active_record-0.3.5 lib/generators/active_record/roles_migration/templates/add_role_string_strategy.erb