enju_bookmark 0.1.2.pre11 → 0.1.2.pre12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/views/bookmark_stats/show.csv.erb +1 -1
  3. data/app/views/bookmark_stats/show.html.erb +1 -1
  4. data/lib/enju_bookmark/version.rb +1 -1
  5. data/spec/controllers/bookmarks_controller_spec.rb +4 -2
  6. data/spec/dummy/app/controllers/application_controller.rb +2 -72
  7. data/spec/dummy/app/models/user.rb +5 -24
  8. data/spec/dummy/config/application.rb +2 -3
  9. data/spec/dummy/db/development.sqlite3 +0 -0
  10. data/spec/dummy/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +8 -8
  11. data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
  12. data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
  13. data/spec/dummy/db/migrate/035_create_reserves.rb +1 -1
  14. data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
  15. data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
  16. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
  17. data/spec/dummy/db/migrate/{20080905191442_create_patron_types.rb → 20080905191442_create_agent_types.rb} +2 -2
  18. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +22 -0
  19. data/spec/dummy/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +2 -2
  20. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  21. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
  22. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
  23. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
  24. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
  25. data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -5
  26. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +6 -11
  27. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
  28. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
  29. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
  30. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
  31. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
  32. data/spec/dummy/db/schema.rb +152 -146
  33. data/spec/dummy/db/test.sqlite3 +0 -0
  34. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  35. data/spec/dummy/solr/data/test/index/segments_qx +0 -0
  36. data/spec/factories/library.rb +13 -0
  37. data/spec/factories/user.rb +34 -6
  38. data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
  39. data/spec/fixtures/{patrons.yml → agents.yml} +46 -46
  40. data/spec/fixtures/library_groups.yml +6 -6
  41. data/spec/fixtures/user_groups.yml +51 -0
  42. data/spec/fixtures/users.yml +7 -0
  43. metadata +53 -59
  44. data/spec/dummy/app/models/role.rb +0 -46
  45. data/spec/dummy/app/models/user_group.rb +0 -36
  46. data/spec/dummy/app/models/user_has_role.rb +0 -22
  47. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
  48. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
  49. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
  50. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
  51. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +0 -11
  52. data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
  53. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +0 -5
  54. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +0 -5
  55. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
  56. data/spec/dummy/db/migrate/20120511072422_add_patron_identifier_to_patron.rb +0 -6
  57. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
  58. data/spec/dummy/solr/data/test/index/segments_eq +0 -0
  59. data/spec/fixtures/series_has_manifestations.yml +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c87c97c601bf0b9341820526c8b8bca43b11f05
4
- data.tar.gz: ed5364b6ddf7e28c4bdda114da2ba46065cd6c18
3
+ metadata.gz: 90a1ecab7210db7ceb1ca8ba67c783244357025f
4
+ data.tar.gz: 6be75d37d73cbaf18ce9426b18f8617b06f567f2
5
5
  SHA512:
6
- metadata.gz: b99d046233064b3f1a3dd084e93e34c2486e3726290fdc708157d021c75ed9629cd10376dbd5da5618d6fb60e3df7e2f91792c491c7d16f693cfd6817c2e2469
7
- data.tar.gz: 97823e8c1b906964532f8795ce1582fa281e131d5f0721bfdd184ad008952bf51f68357949f9eb19036843793de884f1d91908af3d0b87b3ee78dcae2960d95b
6
+ metadata.gz: 377990ec2269ea54410af6721b8c3d848043a6358f7572f38b26a65193d3b3dc9fa160987ebd86696ad0e70fc6fe1db3621535703952a1ddf184f1f3c7537eef
7
+ data.tar.gz: 12d0128635a587316a0087a3f8f7c6aec7394bca3779b47c93e1a070e32aa3d97001699f515ddbcd7c467f17a9d145ccb722b2899485d2d0fd16958c50504bb1
@@ -1,4 +1,4 @@
1
1
  <%=h @bookmark_stat.start_date -%>,<%=h @bookmark_stat.end_date -%><%= "\n" -%>
2
2
  <%- @stats.each do |stat| -%>
3
- "<%=h stat.manifestation.original_title -%>","<%= manifestation_url(stat.manifestation) -%>","<%=h stat.bookmarks_count -%>"<%= "\n" -%>
3
+ "<%=h stat.manifestation.original_title if stat.manifestation -%>","<%= manifestation_url(stat.manifestation) -%>","<%=h stat.bookmarks_count -%>"<%= "\n" -%>
4
4
  <%- end -%>
@@ -31,7 +31,7 @@
31
31
  <%- @stats.each do |stat| -%>
32
32
  <tr class="line<%= cycle("0", "1") -%>">
33
33
  <td>
34
- <%= render 'manifestations/show_index', :manifestation => stat.manifestation -%>
34
+ <%= render 'manifestations/show_index', :manifestation => stat.manifestation if stat.manifestation -%>
35
35
  </td>
36
36
  <td><%= stat.bookmarks_count -%></td>
37
37
  </tr>
@@ -1,3 +1,3 @@
1
1
  module EnjuBookmark
2
- VERSION = "0.1.2.pre11"
2
+ VERSION = "0.1.2.pre12"
3
3
  end
@@ -423,8 +423,10 @@ describe BookmarksController do
423
423
  end
424
424
 
425
425
  it "should not update missing bookmark" do
426
- put :update, :id => 'missing', :bookmark => { }
427
- response.should be_missing
426
+ lambda{
427
+ put :update, :id => 'missing', :bookmark => { }
428
+ }.should raise_error(ActiveRecord::RecordNotFound)
429
+ #response.should be_missing
428
430
  end
429
431
 
430
432
  it "should update bookmark without manifestation_id" do
@@ -1,76 +1,6 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
3
 
4
- rescue_from CanCan::AccessDenied, :with => :render_403
5
- rescue_from ActiveRecord::RecordNotFound, :with => :render_404
6
-
7
- private
8
- def render_403
9
- return if performed?
10
- if user_signed_in?
11
- respond_to do |format|
12
- format.html {render :template => 'page/403', :status => 403}
13
- format.mobile {render :template => 'page/403', :status => 403}
14
- format.xml {render :template => 'page/403', :status => 403}
15
- format.json
16
- end
17
- else
18
- respond_to do |format|
19
- format.html {redirect_to new_user_session_url}
20
- format.mobile {redirect_to new_user_session_url}
21
- format.xml {render :template => 'page/403', :status => 403}
22
- format.json
23
- end
24
- end
25
- end
26
-
27
- def render_404
28
- return if performed?
29
- respond_to do |format|
30
- format.html {render :template => 'page/404', :status => 404}
31
- format.mobile {render :template => 'page/404', :status => 404}
32
- format.xml {render :template => 'page/404', :status => 404}
33
- format.json
34
- end
35
- end
36
-
37
- def not_found
38
- raise ActiveRecord::RecordNotFound
39
- end
40
-
41
- def access_denied
42
- raise CanCan::AccessDenied
43
- end
44
-
45
- def store_location
46
- if request.get? and request.format.try(:html?) and !request.xhr?
47
- session[:user_return_to] = request.fullpath
48
- end
49
- end
50
-
51
- def get_user
52
- @user = User.where(:username => params[:user_id]).first if params[:user_id]
53
- #authorize! :show, @user if @user
54
- end
55
-
56
- def solr_commit
57
- Sunspot.commit
58
- end
59
-
60
- def convert_charset
61
- case params[:format]
62
- when 'csv'
63
- return unless Setting.csv_charset_conversion
64
- # TODO: 他の言語
65
- if @locale.to_sym == :ja
66
- headers["Content-Type"] = "text/csv; charset=Shift_JIS"
67
- response.body = NKF::nkf('-Ws', response.body)
68
- end
69
- when 'xml'
70
- if @locale.to_sym == :ja
71
- headers["Content-Type"] = "application/xml; charset=Shift_JIS"
72
- response.body = NKF::nkf('-Ws', response.body)
73
- end
74
- end
75
- end
4
+ enju_leaf
5
+ enju_library
76
6
  end
@@ -1,28 +1,9 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  class User < ActiveRecord::Base
2
- # Include default devise modules. Others available are:
3
- # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
4
- devise :database_authenticatable, :registerable,
5
- :recoverable, :rememberable, :trackable, :validatable
6
-
7
- # Setup accessible (or protected) attributes for your model
8
- attr_accessible :email, :password, :password_confirmation, :remember_me
9
-
10
- has_one :user_has_role
11
- has_one :role, :through => :user_has_role
12
- belongs_to :required_role, :class_name => 'Role', :foreign_key => 'required_role_id'
3
+ devise :database_authenticatable, #:registerable,
4
+ :recoverable, :rememberable, :trackable, #, :validatable
5
+ :lockable, :lock_strategy => :none, :unlock_strategy => :none
13
6
 
7
+ enju_leaf_user_model
14
8
  enju_bookmark_user_model
15
-
16
- def has_role?(role_in_question)
17
- return false unless role
18
- return true if role.name == role_in_question
19
- case role.name
20
- when 'Administrator'
21
- return true
22
- when 'Librarian'
23
- return true if role_in_question == 'User'
24
- else
25
- false
26
- end
27
- end
28
9
  end
@@ -43,6 +43,5 @@ module Dummy
43
43
  end
44
44
  end
45
45
 
46
- require 'enju_biblio'
47
- require 'enju_library'
48
- require 'mobylette'
46
+ require 'enju_leaf'
47
+ require 'enju_bookmark'
Binary file
@@ -1,6 +1,6 @@
1
- class CreatePatrons < ActiveRecord::Migration
1
+ class CreateAgents < ActiveRecord::Migration
2
2
  def change
3
- create_table :patrons do |t|
3
+ create_table :agents do |t|
4
4
  t.integer :user_id
5
5
  t.string :last_name
6
6
  t.string :middle_name
@@ -35,7 +35,7 @@ class CreatePatrons < ActiveRecord::Migration
35
35
  t.datetime :date_of_death
36
36
  t.integer :language_id, :default => 1, :null => false
37
37
  t.integer :country_id, :default => 1, :null => false
38
- t.integer :patron_type_id, :default => 1, :null => false
38
+ t.integer :agent_type_id, :default => 1, :null => false
39
39
  t.integer :lock_version, :default => 0, :null => false
40
40
  t.text :note
41
41
  t.integer :required_role_id, :default => 1, :null => false
@@ -44,10 +44,10 @@ class CreatePatrons < ActiveRecord::Migration
44
44
  t.text :email
45
45
  t.text :url
46
46
  end
47
- add_index :patrons, :user_id, :unique => true
48
- add_index :patrons, :language_id
49
- add_index :patrons, :country_id
50
- add_index :patrons, :required_role_id
51
- add_index :patrons, :full_name
47
+ add_index :agents, :user_id, :unique => true
48
+ add_index :agents, :language_id
49
+ add_index :agents, :country_id
50
+ add_index :agents, :required_role_id
51
+ add_index :agents, :full_name
52
52
  end
53
53
  end
@@ -1,12 +1,12 @@
1
1
  class CreateOwns < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :owns do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :item, :null => false
6
6
  t.integer :position
7
7
  t.timestamps
8
8
  end
9
- add_index :owns, :patron_id
9
+ add_index :owns, :agent_id
10
10
  add_index :owns, :item_id
11
11
  end
12
12
  end
@@ -1,12 +1,12 @@
1
1
  class CreateCreates < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :creates do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :work, :null => false
6
6
  t.integer :position
7
7
  t.timestamps
8
8
  end
9
- add_index :creates, :patron_id
9
+ add_index :creates, :agent_id
10
10
  add_index :creates, :work_id
11
11
  end
12
12
  end
@@ -11,7 +11,7 @@ class CreateReserves < ActiveRecord::Migration
11
11
  t.datetime :expired_at
12
12
  t.datetime :deleted_at
13
13
  t.string :state
14
- t.boolean :expiration_notice_to_patron, :default => false
14
+ t.boolean :expiration_notice_to_agent, :default => false
15
15
  t.boolean :expiration_notice_to_library, :default => false
16
16
  end
17
17
 
@@ -1,12 +1,12 @@
1
1
  class CreateProduces < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :produces do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :manifestation, :null => false
6
6
  t.integer :position
7
7
  t.timestamps
8
8
  end
9
- add_index :produces, :patron_id
9
+ add_index :produces, :agent_id
10
10
  add_index :produces, :manifestation_id
11
11
  end
12
12
  end
@@ -1,12 +1,12 @@
1
1
  class CreateDonates < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :donates do |t|
4
- t.integer :patron_id, :null => false
4
+ t.integer :agent_id, :null => false
5
5
  t.integer :item_id, :null => false
6
6
 
7
7
  t.timestamps
8
8
  end
9
- add_index :donates, :patron_id
9
+ add_index :donates, :agent_id
10
10
  add_index :donates, :item_id
11
11
  end
12
12
  end
@@ -1,13 +1,13 @@
1
1
  class CreateRealizes < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :realizes do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :expression, :null => false
6
6
  t.integer :position
7
7
 
8
8
  t.timestamps
9
9
  end
10
- add_index :realizes, :patron_id
10
+ add_index :realizes, :agent_id
11
11
  add_index :realizes, :expression_id
12
12
  end
13
13
  end
@@ -1,6 +1,6 @@
1
- class CreatePatronTypes < ActiveRecord::Migration
1
+ class CreateAgentTypes < ActiveRecord::Migration
2
2
  def change
3
- create_table :patron_types do |t|
3
+ create_table :agent_types do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
6
6
  t.text :note
@@ -0,0 +1,22 @@
1
+ class CreateAgentImportFiles < ActiveRecord::Migration
2
+ def change
3
+ create_table :agent_import_files do |t|
4
+ t.integer :parent_id
5
+ t.string :content_type
6
+ t.integer :size
7
+ t.integer :user_id
8
+ t.text :note
9
+ t.datetime :executed_at
10
+ t.string :state
11
+ t.string :agent_import_file_name
12
+ t.string :agent_import_content_type
13
+ t.integer :agent_import_file_size
14
+ t.datetime :agent_import_updated_at
15
+
16
+ t.timestamps
17
+ end
18
+ add_index :agent_import_files, :parent_id
19
+ add_index :agent_import_files, :user_id
20
+ add_index :agent_import_files, :state
21
+ end
22
+ end
@@ -1,6 +1,6 @@
1
- class CreatePatronRelationshipTypes < ActiveRecord::Migration
1
+ class CreateAgentRelationshipTypes < ActiveRecord::Migration
2
2
  def change
3
- create_table :patron_relationship_types do |t|
3
+ create_table :agent_relationship_types do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
6
6
  t.text :note
@@ -1,7 +1,7 @@
1
1
  class AddDcndlSchema < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column :manifestations, :title_alternative_transcription, :text
4
- add_column :patrons, :full_name_alternative_transcription, :text
4
+ add_column :agents, :full_name_alternative_transcription, :text
5
5
  add_column :manifestations, :description, :text
6
6
  add_column :manifestations, :abstract, :text
7
7
  add_column :manifestations, :available_at, :timestamp
@@ -14,7 +14,7 @@ class AddDcndlSchema < ActiveRecord::Migration
14
14
 
15
15
  def self.down
16
16
  remove_column :manifestations, :title_alternative_transcription
17
- remove_column :patrons, :full_name_alternative_transcription
17
+ remove_column :agents, :full_name_alternative_transcription
18
18
  remove_column :manifestations, :description
19
19
  remove_column :manifestations, :abstract
20
20
  remove_column :manifestations, :available_at
@@ -0,0 +1,13 @@
1
+ class CreateAgentRelationships < ActiveRecord::Migration
2
+ def change
3
+ create_table :agent_relationships do |t|
4
+ t.integer :parent_id
5
+ t.integer :child_id
6
+ t.integer :agent_relationship_type_id
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :agent_relationships, :parent_id
11
+ add_index :agent_relationships, :child_id
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ class AddPositionToAgentRelationship < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestation_relationships, :position, :integer
4
+ add_column :agent_relationships, :position, :integer
5
+ end
6
+
7
+ def self.down
8
+ remove_column :agent_relationships, :position
9
+ remove_column :manifestation_relationships, :position
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ class CreateAgentImportResults < ActiveRecord::Migration
2
+ def change
3
+ create_table :agent_import_results do |t|
4
+ t.integer :agent_import_file_id
5
+ t.integer :agent_id
6
+ t.integer :user_id
7
+ t.text :body
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ class AddBirthDateAndDeathDateToAgent < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :agents, :birth_date, :string
4
+ add_column :agents, :death_date, :string
5
+ end
6
+
7
+ def self.down
8
+ remove_column :agents, :death_date
9
+ remove_column :agents, :birth_date
10
+ end
11
+ end
@@ -1,11 +1,6 @@
1
1
  class CreateUsers < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :users do |t|
4
- t.integer :user_group_id
5
- t.integer :required_role_id
6
- t.string :username
7
- t.text :note
8
- t.string :locale
9
4
 
10
5
  t.timestamps
11
6
  end
@@ -19,25 +19,20 @@ class AddDeviseToUsers < ActiveRecord::Migration
19
19
  t.string :current_sign_in_ip
20
20
  t.string :last_sign_in_ip
21
21
 
22
- ## Encryptable
23
- t.string :password_salt
24
-
25
22
  ## Confirmable
26
- t.string :confirmation_token
27
- t.datetime :confirmed_at
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
28
25
  t.datetime :confirmation_sent_at
29
26
  t.string :unconfirmed_email # Only if using reconfirmable
30
27
 
31
28
  ## Lockable
32
- t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
33
- t.string :unlock_token # Only if unlock strategy is :email or :both
34
- t.datetime :locked_at
29
+ # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
35
32
 
36
33
  # Token authenticatable
37
- t.string :authentication_token
38
-
34
+ # t.string :authentication_token
39
35
 
40
- t.datetime :deleted_at
41
36
  end
42
37
 
43
38
  add_index :users, :email #, :unique => true
@@ -0,0 +1,5 @@
1
+ class AddFingerprintToAgentImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :agent_import_files, :agent_import_fingerprint, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToAgentImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :agent_import_files, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddAgentIdentifierToAgent < ActiveRecord::Migration
2
+ def change
3
+ add_column :agents, :agent_identifier, :string
4
+ add_index :agents, :agent_identifier
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddEditModeToAgentImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :agent_import_files, :edit_mode, :string
4
+ end
5
+ end
@@ -0,0 +1,26 @@
1
+ class AddAdditionalAttributesToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :username, :string
4
+ add_column :users, :user_number, :string
5
+ add_column :users, :state, :string
6
+ add_column :users, :locale, :string
7
+ add_column :users, :deleted_at, :datetime
8
+ add_column :users, :expired_at, :datetime
9
+ add_column :users, :library_id, :integer, :default => 1, :null => false
10
+ add_column :users, :required_role_id, :integer, :default => 1, :null => false
11
+ add_column :users, :user_group_id, :integer, :default => 1, :null => false
12
+ add_column :users, :note, :text
13
+ add_column :users, :keyword_list, :text
14
+
15
+ add_column :users, :failed_attempts, :integer
16
+ add_column :users, :unlock_token, :string
17
+ add_column :users, :locked_at, :datetime
18
+
19
+ add_column :users, :confirmed_at, :datetime
20
+
21
+ add_index :users, :username, :unique => true
22
+ add_index :users, :user_group_id
23
+ add_index :users, :user_number, :unique => true
24
+ add_index :users, :unlock_token, :unique => true
25
+ end
26
+ end