Sha256: ef331d5f802527c7902fa90f770e5cb8a67cd408cf587cce86b04286fe2e3298

Contents?: true

Size: 422 Bytes

Versions: 30

Compression:

Stored size: 422 Bytes

Contents

class CreateRoles < ActiveRecord::Migration
  def self.up
    create_table :roles do |t|
      t.string :name
    end
    
    # generate the join table
    create_table :roles_users, :id => false do |t|
      t.integer :role_id
      t.integer :user_id
    end
    add_index "roles_users", "role_id"
    add_index "roles_users", "user_id"
  end

  def self.down
    drop_table :roles
    drop_table :roles_users
  end
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
kdmny-spree-0.0.1 db/migrate/023_create_roles.rb
spree-enriquez-0.9.4 db/migrate/023_create_roles.rb
spree-0.9.4 db/migrate/023_create_roles.rb
spree-0.9.3 db/migrate/023_create_roles.rb
spree-0.9.2 db/migrate/023_create_roles.rb
spree-0.9.1 db/migrate/023_create_roles.rb
spree-0.9.0 db/migrate/023_create_roles.rb
spree-0.8.4 db/migrate/023_create_roles.rb
spree-0.8.5 db/migrate/023_create_roles.rb
railscart-0.0.1 starter-app/db/migrate/006_create_roles.rb
railscart-0.0.2 starter_app/db/migrate/006_create_roles.rb
railscart-0.0.3 starter_app/db/migrate/006_create_roles.rb
railscart-0.0.4 starter_app/db/migrate/002_create_roles.rb
spree-0.0.6 starter-app/db/migrate/002_create_roles.rb
spree-0.0.5 starter-app/db/migrate/002_create_roles.rb
spree-0.0.8 starter-app/db/migrate/002_create_roles.rb
spree-0.0.9 db/migrate/023_create_roles.rb
spree-0.0.7 starter-app/db/migrate/002_create_roles.rb
spree-0.2.0 db/migrate/023_create_roles.rb
spree-0.4.1 db/migrate/023_create_roles.rb