Sha256: 3a12a5b08395a36fc23c3a0bf75d4c559fc2989ac67453aee04e7529a3e6c080

Contents?: true

Size: 257 Bytes

Versions: 7

Compression:

Stored size: 257 Bytes

Contents

class AddUsernameUser < ActiveRecord::Migration
  def self.up
    add_column :users, :username, :string
    add_index :users, :username, :unique => true
  end

  def self.down
    remove_index :users, :username
    remove_column :users, :username
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
squeezer-0.2.1 lib/generators/squeezer/templates/db/migrate/add_username_user.rb
squeezer-0.2.0 lib/generators/squeezer/templates/db/migrate/add_username_user.rb
squeezer-0.1.11 lib/generators/squeezer/templates/db/migrate/add_username_user.rb
squeezer-0.1.7 lib/generators/squeezer/templates/db/migrate/add_username_user.rb
squeezer-0.1.6 lib/generators/squeezer/templates/db/migrate/add_username_user.rb
squeezer-0.1.5 lib/generators/squeezer/templates/db/migrate/add_username_user.rb
squeezer-0.1.4 lib/generators/squeezer/templates/db/migrate/add_username_user.rb