Sha256: bccb82e584de515bfa060856cc4da2715bff22c6a70962e06b9f2038df982a00

Contents?: true

Size: 459 Bytes

Versions: 242

Compression:

Stored size: 459 Bytes

Contents

class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.column :name, :string
      t.column :email, :string
      t.column :age, :integer
      t.column :ssn, :string
      t.column :phone, :string
    end
    add_index :users, :email, :unique => true
    add_index :users, :name
    add_index :users, :age
    add_index :users, [:email, :name], :unique => true
  end

  def self.down
    drop_table :users
  end
end

Version data entries

242 entries across 121 versions & 23 rubygems

Version Path
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails3_root/db/migrate/001_create_users.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails2_root/db/migrate/001_create_users.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/db/migrate/001_create_users.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/db/migrate/001_create_users.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails2_root/db/migrate/001_create_users.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails3_root/db/migrate/001_create_users.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/shoulda-2.11.3/test/rails2_root/db/migrate/001_create_users.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/shoulda-2.11.3/test/rails3_root/db/migrate/001_create_users.rb
Flamefork-shoulda-2.10.1 test/rails_root/db/migrate/001_create_users.rb
Flamefork-shoulda-2.10.2 test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.0 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.1 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.10 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.11 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.12 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.13 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.14 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.15 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.16 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb
auser-poolparty-1.3.17 vendor/gems/shoulda/test/rails_root/db/migrate/001_create_users.rb