Sha256: c4081a66e71b0c67f2170d105af48f7a2d1c809b54fa7e5ec816ce3d44f4cc0b

Contents?: true

Size: 310 Bytes

Versions: 14

Compression:

Stored size: 310 Bytes

Contents

class CreateUserRoles < ActiveRecord::Migration
  def self.up
    create_table :<%= table_name.singularize %>_roles do |t|
      t.integer :<%= table_name.singularize %>_id
      t.integer :role_id
      t.timestamps
    end
  end

  def self.down
    drop_table :<%= table_name.singularize %>_roles
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
roles_active_record-0.4.0 sandbox/create_user_roles_migration.erb
roles_active_record-0.3.6 sandbox/create_user_roles_migration.erb
roles_active_record-0.3.5 sandbox/create_user_roles_migration.erb
roles_active_record-0.3.4 sandbox/create_user_roles_migration.erb
roles_active_record-0.3.3 sandbox/create_user_roles_migration.erb
roles_active_record-0.3.2 sandbox/create_user_roles_migration.erb
roles_active_record-0.3.1 sandbox/create_user_roles_migration.erb
roles_active_record-0.2.5 sandbox/create_user_roles_migration.erb
roles_active_record-0.2.4 sandbox/create_user_roles_migration.erb
roles_active_record-0.2.3 sandbox/create_user_roles_migration.erb
roles_active_record-0.2.2 sandbox/create_user_roles_migration.erb
roles_active_record-0.2.1 sandbox/create_user_roles_migration.erb
roles_active_record-0.2.0 sandbox/create_user_roles_migration.erb
roles_active_record-0.1.0 sandbox/create_user_roles_migration.erb