Sha256: 5c06a74369991e37776b13e28ce17afde3ddbe7be57da29b65cc1dbd0b9f6bce

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

class AddAdditionalAttributesToUser < ActiveRecord::Migration
  def change
    add_column :users, :username, :string
    add_column :users, :user_number, :string
    add_column :users, :state, :string
    add_column :users, :locale, :string
    add_column :users, :deleted_at, :datetime
    add_column :users, :expired_at, :datetime
    add_column :users, :library_id, :integer, :default => 1, :null => false
    add_column :users, :required_role_id, :integer, :default => 1, :null => false
    add_column :users, :user_group_id, :integer, :default => 1, :null => false
    add_column :users, :note, :text
    add_column :users, :keyword_list, :text

    add_column :users, :failed_attempts, :integer, :default => 0
    add_column :users, :unlock_token, :string
    add_column :users, :locked_at, :datetime

    add_column :users, :confirmed_at, :datetime

    add_index :users, :username, :unique => true
    add_index :users, :user_group_id
    add_index :users, :user_number, :unique => true
    add_index :users, :unlock_token,         :unique => true
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
enju_biblio-0.1.0.pre62 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_biblio-0.1.0.pre61 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_biblio-0.1.0.pre60 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_biblio-0.1.0.pre59 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_biblio-0.1.0.pre58 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_biblio-0.1.0.pre57 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_biblio-0.1.0.pre56 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_event-0.1.17.pre18 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_leaf-1.1.0.rc10 db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_oai-0.1.0.pre13 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_leaf-1.1.0.rc9 db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_leaf-1.1.0.rc8 db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_oai-0.1.0.pre12 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_leaf-1.1.0.rc7 db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_leaf-1.1.0.rc6 db/migrate/20130221154434_add_additional_attributes_to_user.rb
enju_oai-0.1.0.pre11 spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb