enju_nii 0.1.0.pre8 → 0.1.0.pre9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/enju_nii.rb +5 -0
  3. data/lib/enju_nii/cinii_book.rb +1 -1
  4. data/lib/enju_nii/version.rb +1 -1
  5. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  6. data/spec/dummy/config/application.rb +1 -1
  7. data/spec/dummy/db/development.sqlite3 +0 -0
  8. data/spec/dummy/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +8 -8
  9. data/spec/dummy/db/migrate/005_create_manifestations.rb +7 -18
  10. data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
  11. data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
  12. data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
  13. data/spec/dummy/db/migrate/077_create_user_groups.rb +12 -0
  14. data/spec/dummy/db/migrate/080_create_library_groups.rb +25 -0
  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/20081028083208_create_resource_import_files.rb +1 -1
  20. data/spec/dummy/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +2 -2
  21. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  22. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
  23. data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +9 -0
  24. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
  25. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
  26. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
  27. data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +9 -0
  28. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
  29. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
  30. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
  31. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +11 -0
  32. data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -5
  33. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +8 -16
  34. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
  35. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
  36. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
  37. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
  38. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
  39. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  40. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
  41. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  42. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  43. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  44. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  45. data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +6 -0
  46. data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +6 -0
  47. data/spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +5 -0
  48. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
  49. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +14 -0
  50. data/spec/dummy/db/migrate/20130511144310_add_manifestation_id_to_item.rb +5 -0
  51. data/spec/dummy/db/schema.rb +225 -210
  52. data/spec/dummy/db/test.sqlite3 +0 -0
  53. data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
  54. data/spec/fixtures/identifiers.yml +113 -0
  55. data/spec/fixtures/library_groups.yml +33 -0
  56. data/spec/fixtures/manifestations.yml +1883 -0
  57. metadata +95 -59
  58. data/spec/dummy/app/models/role.rb +0 -47
  59. data/spec/dummy/app/models/user_has_role.rb +0 -4
  60. data/spec/dummy/db/migrate/143_create_subject_has_classifications.rb +0 -16
  61. data/spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb +0 -18
  62. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
  63. data/spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb +0 -16
  64. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
  65. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
  66. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
  67. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +0 -11
  68. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +0 -9
  69. data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +0 -9
  70. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +0 -13
  71. data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
  72. data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
  73. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +0 -5
  74. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +0 -5
  75. data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
  76. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
  77. data/spec/dummy/db/migrate/20120511072422_add_patron_identifier_to_patron.rb +0 -6
  78. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
  79. data/spec/dummy/lib/master_model.rb +0 -41
@@ -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,22 +19,14 @@ 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
- ## Confirmable
26
- t.string :confirmation_token
27
- t.datetime :confirmed_at
28
- t.datetime :confirmation_sent_at
29
- t.string :unconfirmed_email # Only if using reconfirmable
30
-
31
- ## 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
35
-
36
- # Token authenticatable
37
- t.string :authentication_token
22
+ # t.encryptable
23
+ # t.confirmable
24
+ # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
25
+ # t.token_authenticatable
26
+
27
+
28
+ # Uncomment below if timestamps were not included in your original model.
29
+ # t.timestamps
38
30
  end
39
31
 
40
32
  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,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
@@ -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
@@ -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
@@ -0,0 +1,6 @@
1
+ class AddManifestationIdToSubject < ActiveRecord::Migration
2
+ def change
3
+ add_column :subjects, :manifestation_id, :integer
4
+ add_index :subjects, :manifestation_id
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddManifestationIdToClassification < ActiveRecord::Migration
2
+ def change
3
+ add_column :classifications, :manifestation_id, :integer
4
+ add_index :classifications, :manifestation_id
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddSubjectHeadingTypeIdToSubject < ActiveRecord::Migration
2
+ def change
3
+ add_column :subjects, :subject_heading_type_id, :integer
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ class CreateIdentifierTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :identifier_types do |t|
4
+ t.string :name
5
+ t.text :display_name
6
+ t.text :note
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
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
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class AddManifestationIdToItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :items, :manifestation_id, :integer
4
+ end
5
+ end
@@ -11,7 +11,126 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20121113163717) do
14
+ ActiveRecord::Schema.define(:version => 20130511144310) do
15
+
16
+ create_table "agent_import_files", :force => true do |t|
17
+ t.integer "parent_id"
18
+ t.string "content_type"
19
+ t.integer "size"
20
+ t.integer "user_id"
21
+ t.text "note"
22
+ t.datetime "executed_at"
23
+ t.string "state"
24
+ t.string "agent_import_file_name"
25
+ t.string "agent_import_content_type"
26
+ t.integer "agent_import_file_size"
27
+ t.datetime "agent_import_updated_at"
28
+ t.datetime "created_at", :null => false
29
+ t.datetime "updated_at", :null => false
30
+ t.string "agent_import_fingerprint"
31
+ t.text "error_message"
32
+ t.string "edit_mode"
33
+ end
34
+
35
+ add_index "agent_import_files", ["parent_id"], :name => "index_agent_import_files_on_parent_id"
36
+ add_index "agent_import_files", ["state"], :name => "index_agent_import_files_on_state"
37
+ add_index "agent_import_files", ["user_id"], :name => "index_agent_import_files_on_user_id"
38
+
39
+ create_table "agent_import_results", :force => true do |t|
40
+ t.integer "agent_import_file_id"
41
+ t.integer "agent_id"
42
+ t.integer "user_id"
43
+ t.text "body"
44
+ t.datetime "created_at", :null => false
45
+ t.datetime "updated_at", :null => false
46
+ end
47
+
48
+ create_table "agent_relationship_types", :force => true do |t|
49
+ t.string "name", :null => false
50
+ t.text "display_name"
51
+ t.text "note"
52
+ t.integer "position"
53
+ t.datetime "created_at", :null => false
54
+ t.datetime "updated_at", :null => false
55
+ end
56
+
57
+ create_table "agent_relationships", :force => true do |t|
58
+ t.integer "parent_id"
59
+ t.integer "child_id"
60
+ t.integer "agent_relationship_type_id"
61
+ t.datetime "created_at", :null => false
62
+ t.datetime "updated_at", :null => false
63
+ t.integer "position"
64
+ end
65
+
66
+ add_index "agent_relationships", ["child_id"], :name => "index_agent_relationships_on_child_id"
67
+ add_index "agent_relationships", ["parent_id"], :name => "index_agent_relationships_on_parent_id"
68
+
69
+ create_table "agent_types", :force => true do |t|
70
+ t.string "name", :null => false
71
+ t.text "display_name"
72
+ t.text "note"
73
+ t.integer "position"
74
+ t.datetime "created_at", :null => false
75
+ t.datetime "updated_at", :null => false
76
+ end
77
+
78
+ create_table "agents", :force => true do |t|
79
+ t.integer "user_id"
80
+ t.string "last_name"
81
+ t.string "middle_name"
82
+ t.string "first_name"
83
+ t.string "last_name_transcription"
84
+ t.string "middle_name_transcription"
85
+ t.string "first_name_transcription"
86
+ t.string "corporate_name"
87
+ t.string "corporate_name_transcription"
88
+ t.string "full_name"
89
+ t.text "full_name_transcription"
90
+ t.text "full_name_alternative"
91
+ t.datetime "created_at", :null => false
92
+ t.datetime "updated_at", :null => false
93
+ t.datetime "deleted_at"
94
+ t.string "zip_code_1"
95
+ t.string "zip_code_2"
96
+ t.text "address_1"
97
+ t.text "address_2"
98
+ t.text "address_1_note"
99
+ t.text "address_2_note"
100
+ t.string "telephone_number_1"
101
+ t.string "telephone_number_2"
102
+ t.string "fax_number_1"
103
+ t.string "fax_number_2"
104
+ t.text "other_designation"
105
+ t.text "place"
106
+ t.string "postal_code"
107
+ t.text "street"
108
+ t.text "locality"
109
+ t.text "region"
110
+ t.datetime "date_of_birth"
111
+ t.datetime "date_of_death"
112
+ t.integer "language_id", :default => 1, :null => false
113
+ t.integer "country_id", :default => 1, :null => false
114
+ t.integer "agent_type_id", :default => 1, :null => false
115
+ t.integer "lock_version", :default => 0, :null => false
116
+ t.text "note"
117
+ t.integer "required_role_id", :default => 1, :null => false
118
+ t.integer "required_score", :default => 0, :null => false
119
+ t.string "state"
120
+ t.text "email"
121
+ t.text "url"
122
+ t.text "full_name_alternative_transcription"
123
+ t.string "birth_date"
124
+ t.string "death_date"
125
+ t.string "agent_identifier"
126
+ end
127
+
128
+ add_index "agents", ["agent_identifier"], :name => "index_agents_on_agent_identifier"
129
+ add_index "agents", ["country_id"], :name => "index_agents_on_country_id"
130
+ add_index "agents", ["full_name"], :name => "index_agents_on_full_name"
131
+ add_index "agents", ["language_id"], :name => "index_agents_on_language_id"
132
+ add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
133
+ add_index "agents", ["user_id"], :name => "index_agents_on_user_id", :unique => true
15
134
 
16
135
  create_table "carrier_types", :force => true do |t|
17
136
  t.string "name", :null => false
@@ -40,10 +159,12 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
40
159
  t.datetime "updated_at", :null => false
41
160
  t.integer "lft"
42
161
  t.integer "rgt"
162
+ t.integer "manifestation_id"
43
163
  end
44
164
 
45
165
  add_index "classifications", ["category"], :name => "index_classifications_on_category"
46
166
  add_index "classifications", ["classification_type_id"], :name => "index_classifications_on_classification_type_id"
167
+ add_index "classifications", ["manifestation_id"], :name => "index_classifications_on_manifestation_id"
47
168
  add_index "classifications", ["parent_id"], :name => "index_classifications_on_parent_id"
48
169
 
49
170
  create_table "content_types", :force => true do |t|
@@ -80,7 +201,7 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
80
201
  end
81
202
 
82
203
  create_table "creates", :force => true do |t|
83
- t.integer "patron_id", :null => false
204
+ t.integer "agent_id", :null => false
84
205
  t.integer "work_id", :null => false
85
206
  t.integer "position"
86
207
  t.datetime "created_at", :null => false
@@ -88,18 +209,18 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
88
209
  t.integer "create_type_id"
89
210
  end
90
211
 
91
- add_index "creates", ["patron_id"], :name => "index_creates_on_patron_id"
212
+ add_index "creates", ["agent_id"], :name => "index_creates_on_agent_id"
92
213
  add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
93
214
 
94
215
  create_table "donates", :force => true do |t|
95
- t.integer "patron_id", :null => false
216
+ t.integer "agent_id", :null => false
96
217
  t.integer "item_id", :null => false
97
218
  t.datetime "created_at", :null => false
98
219
  t.datetime "updated_at", :null => false
99
220
  end
100
221
 
222
+ add_index "donates", ["agent_id"], :name => "index_donates_on_agent_id"
101
223
  add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
102
- add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
103
224
 
104
225
  create_table "exemplifies", :force => true do |t|
105
226
  t.integer "manifestation_id", :null => false
@@ -139,6 +260,27 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
139
260
  t.datetime "updated_at", :null => false
140
261
  end
141
262
 
263
+ create_table "identifier_types", :force => true do |t|
264
+ t.string "name"
265
+ t.text "display_name"
266
+ t.text "note"
267
+ t.integer "position"
268
+ t.datetime "created_at", :null => false
269
+ t.datetime "updated_at", :null => false
270
+ end
271
+
272
+ create_table "identifiers", :force => true do |t|
273
+ t.string "body", :null => false
274
+ t.integer "identifier_type_id", :null => false
275
+ t.integer "manifestation_id"
276
+ t.boolean "primary"
277
+ t.integer "position"
278
+ t.datetime "created_at", :null => false
279
+ t.datetime "updated_at", :null => false
280
+ end
281
+
282
+ add_index "identifiers", ["body", "identifier_type_id"], :name => "index_identifiers_on_body_and_identifier_type_id"
283
+
142
284
  create_table "import_requests", :force => true do |t|
143
285
  t.string "isbn"
144
286
  t.string "state"
@@ -170,6 +312,7 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
170
312
  t.datetime "acquired_at"
171
313
  t.integer "bookstore_id"
172
314
  t.integer "budget_type_id"
315
+ t.integer "manifestation_id"
173
316
  end
174
317
 
175
318
  add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
@@ -193,6 +336,27 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
193
336
  add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
194
337
  add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
195
338
 
339
+ create_table "library_groups", :force => true do |t|
340
+ t.string "name", :null => false
341
+ t.text "display_name"
342
+ t.string "short_name", :null => false
343
+ t.string "email"
344
+ t.text "my_networks"
345
+ t.text "login_banner"
346
+ t.text "note"
347
+ t.integer "valid_period_for_new_user", :default => 365, :null => false
348
+ t.boolean "post_to_union_catalog", :default => false, :null => false
349
+ t.integer "country_id"
350
+ t.datetime "created_at", :null => false
351
+ t.datetime "updated_at", :null => false
352
+ t.text "admin_networks"
353
+ t.boolean "allow_bookmark_external_url", :default => false, :null => false
354
+ t.integer "position"
355
+ t.string "url", :default => "http://localhost:3000/"
356
+ end
357
+
358
+ add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
359
+
196
360
  create_table "licenses", :force => true do |t|
197
361
  t.string "name", :null => false
198
362
  t.string "display_name"
@@ -243,13 +407,6 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
243
407
  t.integer "height"
244
408
  t.integer "width"
245
409
  t.integer "depth"
246
- t.string "isbn"
247
- t.string "isbn10"
248
- t.string "wrong_isbn"
249
- t.string "nbn"
250
- t.string "lccn"
251
- t.string "oclc_number"
252
- t.string "issn"
253
410
  t.integer "price"
254
411
  t.text "fulltext"
255
412
  t.string "volume_number_string"
@@ -288,20 +445,17 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
288
445
  t.text "attachment_meta"
289
446
  t.integer "month_of_publication"
290
447
  t.string "ncid"
448
+ t.boolean "fulltext_content"
449
+ t.string "doi"
450
+ t.boolean "periodical"
291
451
  end
292
452
 
293
453
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
294
- add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
295
- add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
296
- add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
297
- add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
298
- add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
454
+ add_index "manifestations", ["date_of_publication"], :name => "index_manifestations_on_date_of_publication"
455
+ add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
299
456
  add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
300
- add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
301
457
  add_index "manifestations", ["ncid"], :name => "index_manifestations_on_ncid"
302
458
  add_index "manifestations", ["nii_type_id"], :name => "index_manifestations_on_nii_type_id"
303
- add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
304
- add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
305
459
  add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
306
460
 
307
461
  create_table "medium_of_performances", :force => true do |t|
@@ -325,134 +479,15 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
325
479
  add_index "nii_types", ["name"], :name => "index_nii_types_on_name", :unique => true
326
480
 
327
481
  create_table "owns", :force => true do |t|
328
- t.integer "patron_id", :null => false
482
+ t.integer "agent_id", :null => false
329
483
  t.integer "item_id", :null => false
330
484
  t.integer "position"
331
485
  t.datetime "created_at", :null => false
332
486
  t.datetime "updated_at", :null => false
333
487
  end
334
488
 
489
+ add_index "owns", ["agent_id"], :name => "index_owns_on_agent_id"
335
490
  add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
336
- add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
337
-
338
- create_table "patron_import_files", :force => true do |t|
339
- t.integer "parent_id"
340
- t.string "content_type"
341
- t.integer "size"
342
- t.integer "user_id"
343
- t.text "note"
344
- t.datetime "executed_at"
345
- t.string "state"
346
- t.string "patron_import_file_name"
347
- t.string "patron_import_content_type"
348
- t.integer "patron_import_file_size"
349
- t.datetime "patron_import_updated_at"
350
- t.datetime "created_at", :null => false
351
- t.datetime "updated_at", :null => false
352
- t.string "patron_import_fingerprint"
353
- t.text "error_message"
354
- t.string "edit_mode"
355
- end
356
-
357
- add_index "patron_import_files", ["parent_id"], :name => "index_patron_import_files_on_parent_id"
358
- add_index "patron_import_files", ["state"], :name => "index_patron_import_files_on_state"
359
- add_index "patron_import_files", ["user_id"], :name => "index_patron_import_files_on_user_id"
360
-
361
- create_table "patron_import_results", :force => true do |t|
362
- t.integer "patron_import_file_id"
363
- t.integer "patron_id"
364
- t.integer "user_id"
365
- t.text "body"
366
- t.datetime "created_at", :null => false
367
- t.datetime "updated_at", :null => false
368
- end
369
-
370
- create_table "patron_relationship_types", :force => true do |t|
371
- t.string "name", :null => false
372
- t.text "display_name"
373
- t.text "note"
374
- t.integer "position"
375
- t.datetime "created_at", :null => false
376
- t.datetime "updated_at", :null => false
377
- end
378
-
379
- create_table "patron_relationships", :force => true do |t|
380
- t.integer "parent_id"
381
- t.integer "child_id"
382
- t.integer "patron_relationship_type_id"
383
- t.datetime "created_at", :null => false
384
- t.datetime "updated_at", :null => false
385
- t.integer "position"
386
- end
387
-
388
- add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
389
- add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
390
-
391
- create_table "patron_types", :force => true do |t|
392
- t.string "name", :null => false
393
- t.text "display_name"
394
- t.text "note"
395
- t.integer "position"
396
- t.datetime "created_at", :null => false
397
- t.datetime "updated_at", :null => false
398
- end
399
-
400
- create_table "patrons", :force => true do |t|
401
- t.integer "user_id"
402
- t.string "last_name"
403
- t.string "middle_name"
404
- t.string "first_name"
405
- t.string "last_name_transcription"
406
- t.string "middle_name_transcription"
407
- t.string "first_name_transcription"
408
- t.string "corporate_name"
409
- t.string "corporate_name_transcription"
410
- t.string "full_name"
411
- t.text "full_name_transcription"
412
- t.text "full_name_alternative"
413
- t.datetime "created_at", :null => false
414
- t.datetime "updated_at", :null => false
415
- t.datetime "deleted_at"
416
- t.string "zip_code_1"
417
- t.string "zip_code_2"
418
- t.text "address_1"
419
- t.text "address_2"
420
- t.text "address_1_note"
421
- t.text "address_2_note"
422
- t.string "telephone_number_1"
423
- t.string "telephone_number_2"
424
- t.string "fax_number_1"
425
- t.string "fax_number_2"
426
- t.text "other_designation"
427
- t.text "place"
428
- t.string "postal_code"
429
- t.text "street"
430
- t.text "locality"
431
- t.text "region"
432
- t.datetime "date_of_birth"
433
- t.datetime "date_of_death"
434
- t.integer "language_id", :default => 1, :null => false
435
- t.integer "country_id", :default => 1, :null => false
436
- t.integer "patron_type_id", :default => 1, :null => false
437
- t.integer "lock_version", :default => 0, :null => false
438
- t.text "note"
439
- t.integer "required_role_id", :default => 1, :null => false
440
- t.integer "required_score", :default => 0, :null => false
441
- t.string "state"
442
- t.text "email"
443
- t.text "url"
444
- t.text "full_name_alternative_transcription"
445
- t.string "birth_date"
446
- t.string "death_date"
447
- t.string "patron_identifier"
448
- end
449
-
450
- add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
451
- add_index "patrons", ["full_name"], :name => "index_patrons_on_full_name"
452
- add_index "patrons", ["language_id"], :name => "index_patrons_on_language_id"
453
- add_index "patrons", ["patron_identifier"], :name => "index_patrons_on_patron_identifier"
454
- add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
455
- add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
456
491
 
457
492
  create_table "picture_files", :force => true do |t|
458
493
  t.integer "picture_attachable_id"
@@ -483,7 +518,7 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
483
518
  end
484
519
 
485
520
  create_table "produces", :force => true do |t|
486
- t.integer "patron_id", :null => false
521
+ t.integer "agent_id", :null => false
487
522
  t.integer "manifestation_id", :null => false
488
523
  t.integer "position"
489
524
  t.datetime "created_at", :null => false
@@ -491,8 +526,8 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
491
526
  t.integer "produce_type_id"
492
527
  end
493
528
 
529
+ add_index "produces", ["agent_id"], :name => "index_produces_on_agent_id"
494
530
  add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
495
- add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
496
531
 
497
532
  create_table "realize_types", :force => true do |t|
498
533
  t.string "name"
@@ -504,7 +539,7 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
504
539
  end
505
540
 
506
541
  create_table "realizes", :force => true do |t|
507
- t.integer "patron_id", :null => false
542
+ t.integer "agent_id", :null => false
508
543
  t.integer "expression_id", :null => false
509
544
  t.integer "position"
510
545
  t.datetime "created_at", :null => false
@@ -512,8 +547,8 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
512
547
  t.integer "realize_type_id"
513
548
  end
514
549
 
550
+ add_index "realizes", ["agent_id"], :name => "index_realizes_on_agent_id"
515
551
  add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
516
- add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
517
552
 
518
553
  create_table "resource_import_files", :force => true do |t|
519
554
  t.integer "parent_id"
@@ -560,17 +595,6 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
560
595
  t.datetime "updated_at", :null => false
561
596
  end
562
597
 
563
- create_table "series_has_manifestations", :force => true do |t|
564
- t.integer "series_statement_id"
565
- t.integer "manifestation_id"
566
- t.integer "position"
567
- t.datetime "created_at", :null => false
568
- t.datetime "updated_at", :null => false
569
- end
570
-
571
- add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
572
- add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
573
-
574
598
  create_table "series_statement_merge_lists", :force => true do |t|
575
599
  t.string "title"
576
600
  t.datetime "created_at", :null => false
@@ -593,42 +617,25 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
593
617
  t.text "title_subseries"
594
618
  t.text "numbering_subseries"
595
619
  t.integer "position"
596
- t.datetime "created_at", :null => false
597
- t.datetime "updated_at", :null => false
620
+ t.datetime "created_at", :null => false
621
+ t.datetime "updated_at", :null => false
598
622
  t.text "title_transcription"
599
623
  t.text "title_alternative"
600
624
  t.string "series_statement_identifier"
601
- t.string "issn"
602
- t.boolean "periodical"
603
- t.integer "root_manifestation_id"
625
+ t.integer "manifestation_id"
604
626
  t.text "note"
605
627
  t.text "title_subseries_transcription"
628
+ t.text "creator_string"
629
+ t.text "volume_number_string"
630
+ t.text "volume_number_transcription_string"
631
+ t.boolean "series_master"
632
+ t.integer "root_manifestation_id"
606
633
  end
607
634
 
608
- add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
635
+ add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
636
+ add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_root_manifestation_id"
609
637
  add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
610
638
 
611
- create_table "subject_has_classifications", :force => true do |t|
612
- t.integer "subject_id"
613
- t.string "subject_type"
614
- t.integer "classification_id", :null => false
615
- t.datetime "created_at", :null => false
616
- t.datetime "updated_at", :null => false
617
- end
618
-
619
- add_index "subject_has_classifications", ["classification_id"], :name => "index_subject_has_classifications_on_classification_id"
620
- add_index "subject_has_classifications", ["subject_id"], :name => "index_subject_has_classifications_on_subject_id"
621
-
622
- create_table "subject_heading_type_has_subjects", :force => true do |t|
623
- t.integer "subject_id", :null => false
624
- t.string "subject_type"
625
- t.integer "subject_heading_type_id", :null => false
626
- t.datetime "created_at", :null => false
627
- t.datetime "updated_at", :null => false
628
- end
629
-
630
- add_index "subject_heading_type_has_subjects", ["subject_id"], :name => "index_subject_heading_type_has_subjects_on_subject_id"
631
-
632
639
  create_table "subject_heading_types", :force => true do |t|
633
640
  t.string "name", :null => false
634
641
  t.text "display_name"
@@ -652,23 +659,38 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
652
659
  t.integer "use_term_id"
653
660
  t.string "term"
654
661
  t.text "term_transcription"
655
- t.integer "subject_type_id", :null => false
662
+ t.integer "subject_type_id", :null => false
656
663
  t.text "scope_note"
657
664
  t.text "note"
658
- t.integer "required_role_id", :default => 1, :null => false
659
- t.integer "lock_version", :default => 0, :null => false
665
+ t.integer "required_role_id", :default => 1, :null => false
666
+ t.integer "lock_version", :default => 0, :null => false
660
667
  t.datetime "created_at"
661
668
  t.datetime "updated_at"
662
669
  t.datetime "deleted_at"
663
670
  t.string "url"
671
+ t.integer "manifestation_id"
672
+ t.integer "subject_heading_type_id"
664
673
  end
665
674
 
675
+ add_index "subjects", ["manifestation_id"], :name => "index_subjects_on_manifestation_id"
666
676
  add_index "subjects", ["parent_id"], :name => "index_subjects_on_parent_id"
667
677
  add_index "subjects", ["required_role_id"], :name => "index_subjects_on_required_role_id"
668
678
  add_index "subjects", ["subject_type_id"], :name => "index_subjects_on_subject_type_id"
669
679
  add_index "subjects", ["term"], :name => "index_subjects_on_term"
670
680
  add_index "subjects", ["use_term_id"], :name => "index_subjects_on_use_term_id"
671
681
 
682
+ create_table "user_groups", :force => true do |t|
683
+ t.string "name"
684
+ t.text "display_name"
685
+ t.text "note"
686
+ t.integer "position"
687
+ t.datetime "created_at", :null => false
688
+ t.datetime "updated_at", :null => false
689
+ t.datetime "deleted_at"
690
+ t.integer "valid_period_for_new_user", :default => 0, :null => false
691
+ t.datetime "expired_at"
692
+ end
693
+
672
694
  create_table "user_has_roles", :force => true do |t|
673
695
  t.integer "user_id"
674
696
  t.integer "role_id"
@@ -677,11 +699,6 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
677
699
  end
678
700
 
679
701
  create_table "users", :force => true do |t|
680
- t.integer "user_group_id"
681
- t.integer "required_role_id"
682
- t.string "username"
683
- t.text "note"
684
- t.string "locale"
685
702
  t.datetime "created_at", :null => false
686
703
  t.datetime "updated_at", :null => false
687
704
  t.string "email", :default => "", :null => false
@@ -694,19 +711,29 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
694
711
  t.datetime "last_sign_in_at"
695
712
  t.string "current_sign_in_ip"
696
713
  t.string "last_sign_in_ip"
697
- t.string "password_salt"
698
- t.string "confirmation_token"
699
- t.datetime "confirmed_at"
700
- t.datetime "confirmation_sent_at"
701
- t.string "unconfirmed_email"
702
- t.integer "failed_attempts", :default => 0
714
+ t.string "username"
715
+ t.string "user_number"
716
+ t.string "state"
717
+ t.string "locale"
718
+ t.datetime "deleted_at"
719
+ t.datetime "expired_at"
720
+ t.integer "library_id", :default => 1, :null => false
721
+ t.integer "required_role_id", :default => 1, :null => false
722
+ t.integer "user_group_id", :default => 1, :null => false
723
+ t.text "note"
724
+ t.text "keyword_list"
725
+ t.integer "failed_attempts"
703
726
  t.string "unlock_token"
704
727
  t.datetime "locked_at"
705
- t.string "authentication_token"
728
+ t.datetime "confirmed_at"
706
729
  end
707
730
 
708
731
  add_index "users", ["email"], :name => "index_users_on_email"
709
732
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
733
+ add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
734
+ add_index "users", ["user_group_id"], :name => "index_users_on_user_group_id"
735
+ add_index "users", ["user_number"], :name => "index_users_on_user_number", :unique => true
736
+ add_index "users", ["username"], :name => "index_users_on_username", :unique => true
710
737
 
711
738
  create_table "versions", :force => true do |t|
712
739
  t.string "item_type", :null => false
@@ -719,16 +746,4 @@ ActiveRecord::Schema.define(:version => 20121113163717) do
719
746
 
720
747
  add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
721
748
 
722
- create_table "work_has_subjects", :force => true do |t|
723
- t.integer "subject_id"
724
- t.string "subject_type"
725
- t.integer "work_id"
726
- t.integer "position"
727
- t.datetime "created_at", :null => false
728
- t.datetime "updated_at", :null => false
729
- end
730
-
731
- add_index "work_has_subjects", ["subject_id"], :name => "index_work_has_subjects_on_subject_id"
732
- add_index "work_has_subjects", ["work_id"], :name => "index_work_has_subjects_on_work_id"
733
-
734
749
  end