enju_bookmark 0.1.2.pre14 → 0.1.2.pre15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/bookmark_stat_has_manifestations_controller.rb +12 -12
  3. data/app/controllers/bookmark_stats_controller.rb +13 -13
  4. data/app/controllers/bookmarks_controller.rb +18 -19
  5. data/app/controllers/tags_controller.rb +6 -7
  6. data/app/models/bookmark.rb +12 -12
  7. data/app/models/bookmark_stat.rb +20 -12
  8. data/app/models/bookmark_stat_has_manifestation.rb +2 -2
  9. data/app/models/bookmark_stat_state_machine.rb +13 -0
  10. data/app/models/bookmark_stat_transition.rb +20 -0
  11. data/app/models/tag.rb +5 -5
  12. data/app/views/bookmark_stat_has_manifestations/edit.html.erb +3 -3
  13. data/app/views/bookmark_stat_has_manifestations/index.html.erb +5 -5
  14. data/app/views/bookmark_stat_has_manifestations/new.html.erb +3 -3
  15. data/app/views/bookmark_stat_has_manifestations/show.html.erb +3 -3
  16. data/app/views/bookmark_stats/edit.html.erb +3 -3
  17. data/app/views/bookmark_stats/index.html.erb +6 -6
  18. data/app/views/bookmark_stats/new.html.erb +3 -3
  19. data/app/views/bookmark_stats/show.html.erb +6 -6
  20. data/app/views/bookmarks/_index.html.erb +8 -8
  21. data/app/views/bookmarks/_index_user.html.erb +9 -9
  22. data/app/views/bookmarks/_tag_cloud.html.erb +1 -1
  23. data/app/views/bookmarks/edit.html.erb +8 -8
  24. data/app/views/bookmarks/new.html.erb +7 -7
  25. data/app/views/bookmarks/show.html.erb +7 -7
  26. data/app/views/manifestations/_bookmarks_for_this_manifestation.html.erb +3 -3
  27. data/app/views/manifestations/_show_tag.html.erb +1 -1
  28. data/app/views/manifestations/_tag_edit.html.erb +8 -8
  29. data/app/views/manifestations/_tag_list.html.erb +2 -2
  30. data/app/views/tags/edit.html.erb +5 -5
  31. data/app/views/tags/index.atom.builder +2 -2
  32. data/app/views/tags/index.html.erb +8 -8
  33. data/app/views/tags/index.rss.builder +5 -5
  34. data/app/views/tags/show.html.erb +6 -6
  35. data/config/routes.rb +0 -3
  36. data/db/migrate/20081212151614_create_bookmark_stats.rb +0 -3
  37. data/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +5 -0
  38. data/lib/enju_bookmark.rb +2 -0
  39. data/lib/enju_bookmark/engine.rb +1 -1
  40. data/lib/enju_bookmark/profile.rb +13 -0
  41. data/lib/enju_bookmark/user.rb +2 -0
  42. data/lib/enju_bookmark/version.rb +1 -1
  43. data/spec/controllers/bookmark_stat_has_manifestations_controller_spec.rb +21 -21
  44. data/spec/controllers/bookmark_stats_controller_spec.rb +21 -21
  45. data/spec/controllers/bookmarks_controller_spec.rb +5 -11
  46. data/spec/controllers/tags_controller_spec.rb +15 -15
  47. data/spec/dummy/config/initializers/statesman.rb +3 -0
  48. data/spec/dummy/db/development.sqlite3 +0 -0
  49. data/spec/dummy/db/migrate/001_create_agents.rb +0 -3
  50. data/spec/dummy/db/migrate/005_create_manifestations.rb +7 -19
  51. data/spec/dummy/db/migrate/006_create_items.rb +0 -3
  52. data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
  53. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +0 -2
  54. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -3
  55. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -1
  56. data/spec/dummy/db/migrate/{20111201163718_create_user_has_roles.rb → 20100606065209_create_user_has_roles.rb} +2 -0
  57. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +0 -2
  58. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
  59. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  60. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -11
  61. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  62. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  63. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  64. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  65. data/spec/dummy/db/migrate/{20111201121844_create_roles.rb → 20130506175303_create_identifier_types.rb} +2 -2
  66. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
  67. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
  68. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
  69. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
  70. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
  71. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
  72. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
  73. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
  74. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
  75. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  76. data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
  77. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
  78. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
  79. data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
  80. data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
  81. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
  82. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
  83. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
  84. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
  85. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
  86. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
  87. data/spec/dummy/db/migrate/{20121119153944_add_manifestation_id_to_item.rb → 20140802082007_add_manifestation_id_to_item.rb} +1 -0
  88. data/spec/dummy/db/schema.rb +215 -55
  89. data/spec/dummy/db/test.sqlite3 +0 -0
  90. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  91. data/spec/dummy/solr/default/data/index/segments_1bi +0 -0
  92. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001699 +0 -0
  93. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000905 → tlog.0000000000000001700} +0 -0
  94. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001701 +0 -0
  95. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001702 +0 -0
  96. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001703 +0 -0
  97. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001704 +0 -0
  98. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001705 +0 -0
  99. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001706 +0 -0
  100. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001707 +0 -0
  101. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001708 +0 -0
  102. data/spec/factories/profile.rb +10 -0
  103. data/spec/factories/user.rb +0 -13
  104. data/spec/fixtures/agents.yml +0 -12
  105. data/spec/fixtures/bookmark_stats.yml +0 -4
  106. data/spec/fixtures/items.yml +60 -21
  107. data/spec/fixtures/manifestations.yml +42 -178
  108. data/spec/fixtures/profiles.yml +99 -0
  109. data/spec/fixtures/users.yml +3 -29
  110. data/spec/models/bookmark_spec.rb +1 -1
  111. data/spec/models/bookmark_stat_spec.rb +1 -3
  112. data/spec/spec_helper.rb +2 -0
  113. metadata +117 -42
  114. data/app/models/bookmark_sweeper.rb +0 -21
  115. data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
  116. data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
  117. data/spec/dummy/solr/default/data/index/segments_pf +0 -0
  118. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000904 +0 -0
  119. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000906 +0 -0
  120. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000907 +0 -0
  121. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000908 +0 -0
  122. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000909 +0 -0
  123. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000910 +0 -0
  124. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000911 +0 -0
  125. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000912 +0 -0
  126. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000913 +0 -0
@@ -0,0 +1,13 @@
1
+ class CreateRoles < ActiveRecord::Migration
2
+ def change
3
+ create_table "roles" do |t|
4
+ t.column :name, :string, :null => false
5
+ t.column :display_name, :string
6
+ t.column :note, :text
7
+ t.column :created_at, :datetime
8
+ t.column :updated_at, :datetime
9
+ t.integer :score, :default => 0, :null => false
10
+ t.integer :position
11
+ end
12
+ end
13
+ end
@@ -7,7 +7,6 @@ class CreateAgentImportFiles < ActiveRecord::Migration
7
7
  t.integer :user_id
8
8
  t.text :note
9
9
  t.datetime :executed_at
10
- t.string :state
11
10
  t.string :agent_import_file_name
12
11
  t.string :agent_import_content_type
13
12
  t.integer :agent_import_file_size
@@ -17,6 +16,5 @@ class CreateAgentImportFiles < ActiveRecord::Migration
17
16
  end
18
17
  add_index :agent_import_files, :parent_id
19
18
  add_index :agent_import_files, :user_id
20
- add_index :agent_import_files, :state
21
19
  end
22
20
  end
@@ -6,8 +6,7 @@ class CreateResourceImportFiles < ActiveRecord::Migration
6
6
  t.integer :size
7
7
  t.integer :user_id
8
8
  t.text :note
9
- t.datetime :imported_at
10
- t.string :state
9
+ t.datetime :executed_at
11
10
  t.string :resource_import_file_name
12
11
  t.string :resource_import_content_type
13
12
  t.integer :resource_import_file_size
@@ -17,6 +16,5 @@ class CreateResourceImportFiles < ActiveRecord::Migration
17
16
  end
18
17
  add_index :resource_import_files, :parent_id
19
18
  add_index :resource_import_files, :user_id
20
- add_index :resource_import_files, :state
21
19
  end
22
20
  end
@@ -2,7 +2,6 @@ class CreateImportRequests < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :import_requests do |t|
4
4
  t.string :isbn
5
- t.string :state
6
5
  t.integer :manifestation_id
7
6
  t.integer :user_id
8
7
 
@@ -6,5 +6,7 @@ class CreateUserHasRoles < ActiveRecord::Migration
6
6
 
7
7
  t.timestamps
8
8
  end
9
+ add_index :user_has_roles, :user_id
10
+ add_index :user_has_roles, :role_id
9
11
  end
10
12
  end
@@ -2,12 +2,10 @@ class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column :user_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
4
4
  add_column :user_groups, :expired_at, :timestamp
5
- remove_column :library_groups, :valid_period_for_new_user
6
5
  end
7
6
 
8
7
  def self.down
9
8
  remove_column :user_groups, :valid_period_for_new_user
10
9
  remove_column :user_groups, :expired_at
11
- add_column :library_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
12
10
  end
13
11
  end
@@ -0,0 +1,5 @@
1
+ class AddFulltextContentToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :fulltext_content, :boolean
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddDoiToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :doi, :string
4
+ add_index :manifestations, :doi
5
+ end
6
+ end
@@ -1,26 +1,16 @@
1
1
  class AddAdditionalAttributesToUser < ActiveRecord::Migration
2
2
  def change
3
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
4
  add_column :users, :deleted_at, :datetime
8
5
  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
6
 
15
- add_column :users, :failed_attempts, :integer
7
+ add_column :users, :failed_attempts, :integer, :default => 0
16
8
  add_column :users, :unlock_token, :string
17
9
  add_column :users, :locked_at, :datetime
18
10
 
19
11
  add_column :users, :confirmed_at, :datetime
20
12
 
21
13
  add_index :users, :username, :unique => true
22
- add_index :users, :user_group_id
23
- add_index :users, :user_number, :unique => true
24
14
  add_index :users, :unlock_token, :unique => true
25
15
  end
26
16
  end
@@ -0,0 +1,5 @@
1
+ class AddPeriodicalToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :periodical, :boolean
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ class AddCreatorStringToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :creator_string, :text
4
+ add_column :series_statements, :volume_number_string, :text
5
+ add_column :series_statements, :volume_number_transcription_string, :text
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ class AddSeriesMasterToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :series_master, :boolean
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddRootManifestationIdToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :root_manifestation_id, :integer
4
+ add_index :series_statements, :root_manifestation_id
5
+ end
6
+ end
@@ -1,6 +1,6 @@
1
- class CreateRoles < ActiveRecord::Migration
1
+ class CreateIdentifierTypes < ActiveRecord::Migration
2
2
  def change
3
- create_table :roles do |t|
3
+ create_table :identifier_types do |t|
4
4
  t.string :name
5
5
  t.text :display_name
6
6
  t.text :note
@@ -0,0 +1,15 @@
1
+ class CreateIdentifiers < ActiveRecord::Migration
2
+ def change
3
+ create_table :identifiers do |t|
4
+ t.string :body, :null => false
5
+ t.integer :identifier_type_id, :null => false
6
+ t.integer :manifestation_id
7
+ t.boolean :primary
8
+ t.integer :position
9
+
10
+ t.timestamps
11
+ end
12
+ add_index :identifiers, [:body, :identifier_type_id]
13
+ add_index :identifiers, :manifestation_id
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ class AddStatementOfResponsibilityToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :statement_of_responsibility, :text
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ class CreateUserImportFiles < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_import_files do |t|
4
+ t.integer :user_id
5
+ t.text :note
6
+ t.datetime :executed_at
7
+ t.string :user_import_file_name
8
+ t.string :user_import_content_type
9
+ t.string :user_import_file_size
10
+ t.datetime :user_import_updated_at
11
+ t.string :user_import_fingerprint
12
+ t.string :edit_mode
13
+ t.text :error_message
14
+
15
+ t.timestamps
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,11 @@
1
+ class CreateUserImportResults < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_import_results do |t|
4
+ t.integer :user_import_file_id
5
+ t.integer :user_id
6
+ t.text :body
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,20 @@
1
+ class CreateProfiles < ActiveRecord::Migration
2
+ def change
3
+ create_table :profiles do |t|
4
+ t.integer :user_id
5
+ t.integer :user_group_id
6
+ t.integer :library_id
7
+ t.string :locale
8
+ t.string :user_number
9
+ t.text :full_name
10
+ t.text :note
11
+ t.text :keyword_list
12
+ t.integer :required_role_id
13
+
14
+ t.timestamps
15
+ end
16
+
17
+ add_index :profiles, :user_id
18
+ add_index :profiles, :user_number, :unique => true
19
+ end
20
+ end
@@ -0,0 +1,14 @@
1
+ class CreateResourceImportFileTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :resource_import_file_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :resource_import_file_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :resource_import_file_transitions, :resource_import_file_id, name: "index_resource_import_file_transitions_on_file_id"
12
+ add_index :resource_import_file_transitions, [:sort_key, :resource_import_file_id], unique: true, name: "index_resource_import_file_transitions_on_sort_key_and_file_id"
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class CreateImportRequestTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :import_request_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :import_request_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :import_request_transitions, :import_request_id
12
+ add_index :import_request_transitions, [:sort_key, :import_request_id], unique: true, name: "index_import_request_transitions_on_sort_key_and_request_id"
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class CreateAgentImportFileTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :agent_import_file_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :agent_import_file_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :agent_import_file_transitions, :agent_import_file_id
12
+ add_index :agent_import_file_transitions, [:sort_key, :agent_import_file_id], unique: true, name: "index_agent_import_file_transitions_on_sort_key_and_file_id"
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class CreateUserImportFileTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_import_file_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :user_import_file_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :user_import_file_transitions, :user_import_file_id
12
+ add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
13
+ end
14
+ end
@@ -0,0 +1,11 @@
1
+ class DropEmailUniqueConstraintEnjuLeafRc10 < ActiveRecord::Migration
2
+ def up
3
+ remove_index :users, :email
4
+ add_index :users, :email
5
+ end
6
+
7
+ def down
8
+ remove_index :users, :email
9
+ add_index :users, :email, unique: true
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateResourceExportFiles < ActiveRecord::Migration
2
+ def change
3
+ create_table :resource_export_files do |t|
4
+ t.integer :user_id
5
+ t.attachment :resource_export
6
+ t.datetime :executed_at
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ class CreateResourceExportFileTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :resource_export_file_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :resource_export_file_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :resource_export_file_transitions, :resource_export_file_id, name: "index_resource_export_file_transitions_on_file_id"
12
+ add_index :resource_export_file_transitions, [:sort_key, :resource_export_file_id], unique: true, name: "index_resource_export_file_transitions_on_sort_key_and_file_id"
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class AddUserEncodingToUserImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :user_import_files, :user_encoding, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddUserEncodingToAgentImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :agent_import_files, :user_encoding, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddUserEncodingToResourceImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :resource_import_files, :user_encoding, :string
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class CreateUserExportFiles < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_export_files do |t|
4
+ t.integer :user_id
5
+ t.attachment :user_export
6
+ t.datetime :executed_at
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ class CreateUserExportFileTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_export_file_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :user_export_file_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :user_export_file_transitions, :user_export_file_id, name: "index_user_export_file_transitions_on_file_id"
12
+ add_index :user_export_file_transitions, [:sort_key, :user_export_file_id], unique: true, name: "index_user_export_file_transitions_on_sort_key_and_file_id"
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ class AddBindingItemIdentifierToItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :items, :binding_item_identifier, :string
4
+ add_column :items, :binding_call_number, :string
5
+ add_column :items, :binded_at, :datetime
6
+ add_index :items, :binding_item_identifier
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :user_import_files, :default_library_id, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDefaultUserGroupIdToUserImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :user_import_files, :default_user_group_id, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDefaultShelfIdToResourceImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :resource_import_files, :default_shelf_id, :integer
4
+ end
5
+ end
@@ -1,5 +1,6 @@
1
1
  class AddManifestationIdToItem < ActiveRecord::Migration
2
2
  def change
3
3
  add_column :items, :manifestation_id, :integer
4
+ add_index :items, :manifestation_id
4
5
  end
5
6
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20130221154434) do
14
+ ActiveRecord::Schema.define(:version => 20140812093836) do
15
15
 
16
16
  create_table "accepts", :force => true do |t|
17
17
  t.integer "basket_id"
@@ -24,6 +24,18 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
24
24
  add_index "accepts", ["basket_id"], :name => "index_accepts_on_basket_id"
25
25
  add_index "accepts", ["item_id"], :name => "index_accepts_on_item_id"
26
26
 
27
+ create_table "agent_import_file_transitions", :force => true do |t|
28
+ t.string "to_state"
29
+ t.text "metadata", :default => "{}"
30
+ t.integer "sort_key"
31
+ t.integer "agent_import_file_id"
32
+ t.datetime "created_at", :null => false
33
+ t.datetime "updated_at", :null => false
34
+ end
35
+
36
+ add_index "agent_import_file_transitions", ["agent_import_file_id"], :name => "index_agent_import_file_transitions_on_agent_import_file_id"
37
+ add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], :name => "index_agent_import_file_transitions_on_sort_key_and_file_id", :unique => true
38
+
27
39
  create_table "agent_import_files", :force => true do |t|
28
40
  t.integer "parent_id"
29
41
  t.string "content_type"
@@ -31,7 +43,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
31
43
  t.integer "user_id"
32
44
  t.text "note"
33
45
  t.datetime "executed_at"
34
- t.string "state"
35
46
  t.string "agent_import_file_name"
36
47
  t.string "agent_import_content_type"
37
48
  t.integer "agent_import_file_size"
@@ -41,10 +52,10 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
41
52
  t.string "agent_import_fingerprint"
42
53
  t.text "error_message"
43
54
  t.string "edit_mode"
55
+ t.string "user_encoding"
44
56
  end
45
57
 
46
58
  add_index "agent_import_files", ["parent_id"], :name => "index_agent_import_files_on_parent_id"
47
- add_index "agent_import_files", ["state"], :name => "index_agent_import_files_on_state"
48
59
  add_index "agent_import_files", ["user_id"], :name => "index_agent_import_files_on_user_id"
49
60
 
50
61
  create_table "agent_import_results", :force => true do |t|
@@ -87,7 +98,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
87
98
  end
88
99
 
89
100
  create_table "agents", :force => true do |t|
90
- t.integer "user_id"
91
101
  t.string "last_name"
92
102
  t.string "middle_name"
93
103
  t.string "first_name"
@@ -127,7 +137,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
127
137
  t.text "note"
128
138
  t.integer "required_role_id", :default => 1, :null => false
129
139
  t.integer "required_score", :default => 0, :null => false
130
- t.string "state"
131
140
  t.text "email"
132
141
  t.text "url"
133
142
  t.text "full_name_alternative_transcription"
@@ -141,7 +150,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
141
150
  add_index "agents", ["full_name"], :name => "index_agents_on_full_name"
142
151
  add_index "agents", ["language_id"], :name => "index_agents_on_language_id"
143
152
  add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
144
- add_index "agents", ["user_id"], :name => "index_agents_on_user_id", :unique => true
145
153
 
146
154
  create_table "baskets", :force => true do |t|
147
155
  t.integer "user_id"
@@ -164,19 +172,28 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
164
172
  add_index "bookmark_stat_has_manifestations", ["bookmark_stat_id"], :name => "index_bookmark_stat_has_manifestations_on_bookmark_stat_id"
165
173
  add_index "bookmark_stat_has_manifestations", ["manifestation_id"], :name => "index_bookmark_stat_has_manifestations_on_manifestation_id"
166
174
 
175
+ create_table "bookmark_stat_transitions", :force => true do |t|
176
+ t.string "to_state"
177
+ t.text "metadata", :default => "{}"
178
+ t.integer "sort_key"
179
+ t.integer "bookmark_stat_id"
180
+ t.datetime "created_at", :null => false
181
+ t.datetime "updated_at", :null => false
182
+ end
183
+
184
+ add_index "bookmark_stat_transitions", ["bookmark_stat_id"], :name => "index_bookmark_stat_transitions_on_bookmark_stat_id"
185
+ add_index "bookmark_stat_transitions", ["sort_key", "bookmark_stat_id"], :name => "index_bookmark_stat_transitions_on_sort_key_and_stat_id", :unique => true
186
+
167
187
  create_table "bookmark_stats", :force => true do |t|
168
188
  t.datetime "start_date"
169
189
  t.datetime "end_date"
170
190
  t.datetime "started_at"
171
191
  t.datetime "completed_at"
172
192
  t.text "note"
173
- t.string "state"
174
193
  t.datetime "created_at", :null => false
175
194
  t.datetime "updated_at", :null => false
176
195
  end
177
196
 
178
- add_index "bookmark_stats", ["state"], :name => "index_bookmark_stats_on_state"
179
-
180
197
  create_table "bookmarks", :force => true do |t|
181
198
  t.integer "user_id", :null => false
182
199
  t.integer "manifestation_id"
@@ -415,9 +432,42 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
415
432
  t.datetime "updated_at", :null => false
416
433
  end
417
434
 
435
+ create_table "identifier_types", :force => true do |t|
436
+ t.string "name"
437
+ t.text "display_name"
438
+ t.text "note"
439
+ t.integer "position"
440
+ t.datetime "created_at", :null => false
441
+ t.datetime "updated_at", :null => false
442
+ end
443
+
444
+ create_table "identifiers", :force => true do |t|
445
+ t.string "body", :null => false
446
+ t.integer "identifier_type_id", :null => false
447
+ t.integer "manifestation_id"
448
+ t.boolean "primary"
449
+ t.integer "position"
450
+ t.datetime "created_at", :null => false
451
+ t.datetime "updated_at", :null => false
452
+ end
453
+
454
+ add_index "identifiers", ["body", "identifier_type_id"], :name => "index_identifiers_on_body_and_identifier_type_id"
455
+ add_index "identifiers", ["manifestation_id"], :name => "index_identifiers_on_manifestation_id"
456
+
457
+ create_table "import_request_transitions", :force => true do |t|
458
+ t.string "to_state"
459
+ t.text "metadata", :default => "{}"
460
+ t.integer "sort_key"
461
+ t.integer "import_request_id"
462
+ t.datetime "created_at", :null => false
463
+ t.datetime "updated_at", :null => false
464
+ end
465
+
466
+ add_index "import_request_transitions", ["import_request_id"], :name => "index_import_request_transitions_on_import_request_id"
467
+ add_index "import_request_transitions", ["sort_key", "import_request_id"], :name => "index_import_request_transitions_on_sort_key_and_request_id", :unique => true
468
+
418
469
  create_table "import_requests", :force => true do |t|
419
470
  t.string "isbn"
420
- t.string "state"
421
471
  t.integer "manifestation_id"
422
472
  t.integer "user_id"
423
473
  t.datetime "created_at", :null => false
@@ -441,26 +491,30 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
441
491
  create_table "items", :force => true do |t|
442
492
  t.string "call_number"
443
493
  t.string "item_identifier"
444
- t.datetime "created_at", :null => false
445
- t.datetime "updated_at", :null => false
494
+ t.datetime "created_at", :null => false
495
+ t.datetime "updated_at", :null => false
446
496
  t.datetime "deleted_at"
447
- t.integer "shelf_id", :default => 1, :null => false
448
- t.boolean "include_supplements", :default => false, :null => false
497
+ t.integer "shelf_id", :default => 1, :null => false
498
+ t.boolean "include_supplements", :default => false, :null => false
449
499
  t.text "note"
450
500
  t.string "url"
451
501
  t.integer "price"
452
- t.integer "lock_version", :default => 0, :null => false
453
- t.integer "required_role_id", :default => 1, :null => false
454
- t.string "state"
455
- t.integer "required_score", :default => 0, :null => false
502
+ t.integer "lock_version", :default => 0, :null => false
503
+ t.integer "required_role_id", :default => 1, :null => false
504
+ t.integer "required_score", :default => 0, :null => false
456
505
  t.datetime "acquired_at"
457
506
  t.integer "bookstore_id"
458
507
  t.integer "budget_type_id"
508
+ t.string "binding_item_identifier"
509
+ t.string "binding_call_number"
510
+ t.datetime "binded_at"
459
511
  t.integer "manifestation_id"
460
512
  end
461
513
 
514
+ add_index "items", ["binding_item_identifier"], :name => "index_items_on_binding_item_identifier"
462
515
  add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
463
516
  add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
517
+ add_index "items", ["manifestation_id"], :name => "index_items_on_manifestation_id"
464
518
  add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
465
519
  add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
466
520
 
@@ -530,6 +584,7 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
530
584
  t.text "my_networks"
531
585
  t.text "login_banner"
532
586
  t.text "note"
587
+ t.integer "valid_period_for_new_user", :default => 365, :null => false
533
588
  t.integer "country_id"
534
589
  t.datetime "created_at", :null => false
535
590
  t.datetime "updated_at", :null => false
@@ -617,13 +672,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
617
672
  t.integer "height"
618
673
  t.integer "width"
619
674
  t.integer "depth"
620
- t.string "isbn"
621
- t.string "isbn10"
622
- t.string "wrong_isbn"
623
- t.string "nbn"
624
- t.string "lccn"
625
- t.string "oclc_number"
626
- t.string "issn"
627
675
  t.integer "price"
628
676
  t.text "fulltext"
629
677
  t.string "volume_number_string"
@@ -634,7 +682,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
634
682
  t.boolean "repository_content", :default => false, :null => false
635
683
  t.integer "lock_version", :default => 0, :null => false
636
684
  t.integer "required_role_id", :default => 1, :null => false
637
- t.string "state"
638
685
  t.integer "required_score", :default => 0, :null => false
639
686
  t.integer "frequency_id", :default => 1, :null => false
640
687
  t.boolean "subscription_master", :default => false, :null => false
@@ -660,18 +707,16 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
660
707
  t.integer "year_of_publication"
661
708
  t.text "attachment_meta"
662
709
  t.integer "month_of_publication"
710
+ t.boolean "fulltext_content"
711
+ t.string "doi"
712
+ t.boolean "periodical"
713
+ t.text "statement_of_responsibility"
663
714
  end
664
715
 
665
716
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
666
- add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
667
- add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
668
- add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
669
- add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
670
- add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
717
+ add_index "manifestations", ["date_of_publication"], :name => "index_manifestations_on_date_of_publication"
718
+ add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
671
719
  add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
672
- add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
673
- add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
674
- add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
675
720
  add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
676
721
 
677
722
  create_table "medium_of_performances", :force => true do |t|
@@ -734,6 +779,24 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
734
779
  add_index "produces", ["agent_id"], :name => "index_produces_on_agent_id"
735
780
  add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
736
781
 
782
+ create_table "profiles", :force => true do |t|
783
+ t.integer "user_id"
784
+ t.integer "user_group_id"
785
+ t.integer "library_id"
786
+ t.string "locale"
787
+ t.string "user_number"
788
+ t.text "full_name"
789
+ t.text "note"
790
+ t.text "keyword_list"
791
+ t.integer "required_role_id"
792
+ t.datetime "created_at", :null => false
793
+ t.datetime "updated_at", :null => false
794
+ t.boolean "share_bookmarks"
795
+ end
796
+
797
+ add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id"
798
+ add_index "profiles", ["user_number"], :name => "index_profiles_on_user_number", :unique => true
799
+
737
800
  create_table "realize_types", :force => true do |t|
738
801
  t.string "name"
739
802
  t.text "display_name"
@@ -816,6 +879,41 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
816
879
  add_index "reserves", ["request_status_type_id"], :name => "index_reserves_on_request_status_type_id"
817
880
  add_index "reserves", ["user_id"], :name => "index_reserves_on_user_id"
818
881
 
882
+ create_table "resource_export_file_transitions", :force => true do |t|
883
+ t.string "to_state"
884
+ t.text "metadata", :default => "{}"
885
+ t.integer "sort_key"
886
+ t.integer "resource_export_file_id"
887
+ t.datetime "created_at", :null => false
888
+ t.datetime "updated_at", :null => false
889
+ end
890
+
891
+ add_index "resource_export_file_transitions", ["resource_export_file_id"], :name => "index_resource_export_file_transitions_on_file_id"
892
+ add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], :name => "index_resource_export_file_transitions_on_sort_key_and_file_id", :unique => true
893
+
894
+ create_table "resource_export_files", :force => true do |t|
895
+ t.integer "user_id"
896
+ t.string "resource_export_file_name"
897
+ t.string "resource_export_content_type"
898
+ t.integer "resource_export_file_size"
899
+ t.datetime "resource_export_updated_at"
900
+ t.datetime "executed_at"
901
+ t.datetime "created_at", :null => false
902
+ t.datetime "updated_at", :null => false
903
+ end
904
+
905
+ create_table "resource_import_file_transitions", :force => true do |t|
906
+ t.string "to_state"
907
+ t.text "metadata", :default => "{}"
908
+ t.integer "sort_key"
909
+ t.integer "resource_import_file_id"
910
+ t.datetime "created_at", :null => false
911
+ t.datetime "updated_at", :null => false
912
+ end
913
+
914
+ add_index "resource_import_file_transitions", ["resource_import_file_id"], :name => "index_resource_import_file_transitions_on_file_id"
915
+ add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], :name => "index_resource_import_file_transitions_on_sort_key_and_file_id", :unique => true
916
+
819
917
  create_table "resource_import_files", :force => true do |t|
820
918
  t.integer "parent_id"
821
919
  t.string "content_type"
@@ -823,7 +921,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
823
921
  t.integer "user_id"
824
922
  t.text "note"
825
923
  t.datetime "executed_at"
826
- t.string "state"
827
924
  t.string "resource_import_file_name"
828
925
  t.string "resource_import_content_type"
829
926
  t.integer "resource_import_file_size"
@@ -833,10 +930,11 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
833
930
  t.string "edit_mode"
834
931
  t.string "resource_import_fingerprint"
835
932
  t.text "error_message"
933
+ t.string "user_encoding"
934
+ t.integer "default_shelf_id"
836
935
  end
837
936
 
838
937
  add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
839
- add_index "resource_import_files", ["state"], :name => "index_resource_import_files_on_state"
840
938
  add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
841
939
 
842
940
  create_table "resource_import_results", :force => true do |t|
@@ -853,12 +951,13 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
853
951
  add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
854
952
 
855
953
  create_table "roles", :force => true do |t|
856
- t.string "name"
857
- t.text "display_name"
954
+ t.string "name", :null => false
955
+ t.string "display_name"
858
956
  t.text "note"
957
+ t.datetime "created_at"
958
+ t.datetime "updated_at"
959
+ t.integer "score", :default => 0, :null => false
859
960
  t.integer "position"
860
- t.datetime "created_at", :null => false
861
- t.datetime "updated_at", :null => false
862
961
  end
863
962
 
864
963
  create_table "search_engines", :force => true do |t|
@@ -916,8 +1015,8 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
916
1015
  t.text "title_subseries"
917
1016
  t.text "numbering_subseries"
918
1017
  t.integer "position"
919
- t.datetime "created_at", :null => false
920
- t.datetime "updated_at", :null => false
1018
+ t.datetime "created_at", :null => false
1019
+ t.datetime "updated_at", :null => false
921
1020
  t.text "title_transcription"
922
1021
  t.text "title_alternative"
923
1022
  t.string "series_statement_identifier"
@@ -926,9 +1025,15 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
926
1025
  t.integer "manifestation_id"
927
1026
  t.text "note"
928
1027
  t.text "title_subseries_transcription"
1028
+ t.text "creator_string"
1029
+ t.text "volume_number_string"
1030
+ t.text "volume_number_transcription_string"
1031
+ t.boolean "series_master"
1032
+ t.integer "root_manifestation_id"
929
1033
  end
930
1034
 
931
1035
  add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
1036
+ add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_root_manifestation_id"
932
1037
  add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
933
1038
 
934
1039
  create_table "shelves", :force => true do |t|
@@ -988,8 +1093,9 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
988
1093
  create_table "tags", :force => true do |t|
989
1094
  t.string "name"
990
1095
  t.string "name_transcription"
991
- t.datetime "created_at", :null => false
992
- t.datetime "updated_at", :null => false
1096
+ t.datetime "created_at", :null => false
1097
+ t.datetime "updated_at", :null => false
1098
+ t.integer "taggings_count", :default => 0
993
1099
  end
994
1100
 
995
1101
  create_table "use_restrictions", :force => true do |t|
@@ -1014,6 +1120,29 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
1014
1120
 
1015
1121
  add_index "user_checkout_stats", ["state"], :name => "index_user_checkout_stats_on_state"
1016
1122
 
1123
+ create_table "user_export_file_transitions", :force => true do |t|
1124
+ t.string "to_state"
1125
+ t.text "metadata", :default => "{}"
1126
+ t.integer "sort_key"
1127
+ t.integer "user_export_file_id"
1128
+ t.datetime "created_at", :null => false
1129
+ t.datetime "updated_at", :null => false
1130
+ end
1131
+
1132
+ add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], :name => "index_user_export_file_transitions_on_sort_key_and_file_id", :unique => true
1133
+ add_index "user_export_file_transitions", ["user_export_file_id"], :name => "index_user_export_file_transitions_on_file_id"
1134
+
1135
+ create_table "user_export_files", :force => true do |t|
1136
+ t.integer "user_id"
1137
+ t.string "user_export_file_name"
1138
+ t.string "user_export_content_type"
1139
+ t.integer "user_export_file_size"
1140
+ t.datetime "user_export_updated_at"
1141
+ t.datetime "executed_at"
1142
+ t.datetime "created_at", :null => false
1143
+ t.datetime "updated_at", :null => false
1144
+ end
1145
+
1017
1146
  create_table "user_group_has_checkout_types", :force => true do |t|
1018
1147
  t.integer "user_group_id", :null => false
1019
1148
  t.integer "checkout_type_id", :null => false
@@ -1056,6 +1185,47 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
1056
1185
  t.datetime "updated_at", :null => false
1057
1186
  end
1058
1187
 
1188
+ add_index "user_has_roles", ["role_id"], :name => "index_user_has_roles_on_role_id"
1189
+ add_index "user_has_roles", ["user_id"], :name => "index_user_has_roles_on_user_id"
1190
+
1191
+ create_table "user_import_file_transitions", :force => true do |t|
1192
+ t.string "to_state"
1193
+ t.text "metadata", :default => "{}"
1194
+ t.integer "sort_key"
1195
+ t.integer "user_import_file_id"
1196
+ t.datetime "created_at", :null => false
1197
+ t.datetime "updated_at", :null => false
1198
+ end
1199
+
1200
+ add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], :name => "index_user_import_file_transitions_on_sort_key_and_file_id", :unique => true
1201
+ add_index "user_import_file_transitions", ["user_import_file_id"], :name => "index_user_import_file_transitions_on_user_import_file_id"
1202
+
1203
+ create_table "user_import_files", :force => true do |t|
1204
+ t.integer "user_id"
1205
+ t.text "note"
1206
+ t.datetime "executed_at"
1207
+ t.string "user_import_file_name"
1208
+ t.string "user_import_content_type"
1209
+ t.string "user_import_file_size"
1210
+ t.datetime "user_import_updated_at"
1211
+ t.string "user_import_fingerprint"
1212
+ t.string "edit_mode"
1213
+ t.text "error_message"
1214
+ t.datetime "created_at", :null => false
1215
+ t.datetime "updated_at", :null => false
1216
+ t.string "user_encoding"
1217
+ t.integer "default_library_id"
1218
+ t.integer "default_user_group_id"
1219
+ end
1220
+
1221
+ create_table "user_import_results", :force => true do |t|
1222
+ t.integer "user_import_file_id"
1223
+ t.integer "user_id"
1224
+ t.text "body"
1225
+ t.datetime "created_at", :null => false
1226
+ t.datetime "updated_at", :null => false
1227
+ end
1228
+
1059
1229
  create_table "user_reserve_stats", :force => true do |t|
1060
1230
  t.datetime "start_date"
1061
1231
  t.datetime "end_date"
@@ -1088,17 +1258,9 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
1088
1258
  t.string "checkout_icalendar_token"
1089
1259
  t.boolean "share_bookmarks"
1090
1260
  t.string "username"
1091
- t.string "user_number"
1092
- t.string "state"
1093
- t.string "locale"
1094
1261
  t.datetime "deleted_at"
1095
1262
  t.datetime "expired_at"
1096
- t.integer "library_id", :default => 1, :null => false
1097
- t.integer "required_role_id", :default => 1, :null => false
1098
- t.integer "user_group_id", :default => 1, :null => false
1099
- t.text "note"
1100
- t.text "keyword_list"
1101
- t.integer "failed_attempts"
1263
+ t.integer "failed_attempts", :default => 0
1102
1264
  t.string "unlock_token"
1103
1265
  t.datetime "locked_at"
1104
1266
  t.datetime "confirmed_at"
@@ -1108,8 +1270,6 @@ ActiveRecord::Schema.define(:version => 20130221154434) do
1108
1270
  add_index "users", ["email"], :name => "index_users_on_email"
1109
1271
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
1110
1272
  add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
1111
- add_index "users", ["user_group_id"], :name => "index_users_on_user_group_id"
1112
- add_index "users", ["user_number"], :name => "index_users_on_user_number", :unique => true
1113
1273
  add_index "users", ["username"], :name => "index_users_on_username", :unique => true
1114
1274
 
1115
1275
  create_table "versions", :force => true do |t|