enju_circulation 0.0.47 → 0.0.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/app/models/reserve.rb +9 -9
  2. data/lib/enju_circulation/controller.rb +25 -0
  3. data/lib/enju_circulation/manifestation.rb +61 -45
  4. data/lib/enju_circulation/version.rb +1 -1
  5. data/lib/enju_circulation.rb +4 -1
  6. data/spec/dummy/README.rdoc +261 -0
  7. data/spec/dummy/app/controllers/application_controller.rb +4 -13
  8. data/spec/dummy/app/models/user_group.rb +11 -0
  9. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  10. data/spec/dummy/db/migrate/001_create_patrons.rb +1 -5
  11. data/spec/dummy/db/migrate/005_create_manifestations.rb +1 -8
  12. data/spec/dummy/db/migrate/006_create_items.rb +1 -6
  13. data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
  14. data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
  15. data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
  16. data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -5
  17. data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
  18. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
  19. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +1 -7
  20. data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +1 -5
  21. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
  22. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -5
  23. data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
  24. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
  25. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
  26. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
  27. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
  28. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
  29. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
  30. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
  31. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
  32. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
  33. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
  34. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
  35. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +9 -0
  36. data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +9 -0
  37. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
  38. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
  39. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
  40. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +13 -0
  41. data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
  42. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
  43. data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +13 -0
  44. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
  45. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
  46. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
  47. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
  48. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
  49. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
  50. data/spec/dummy/db/schema.rb +246 -36
  51. data/spec/dummy/db/test.sqlite3 +0 -0
  52. data/spec/dummy/lib/enju_leaf.rb +2 -0
  53. metadata +71 -33
  54. data/lib/enju_circulation/user_group.rb +0 -10
  55. data/spec/dummy/app/models/basket.rb +0 -64
  56. data/spec/dummy/app/models/carrier_type.rb +0 -33
  57. data/spec/dummy/app/models/event.rb +0 -85
  58. data/spec/dummy/app/models/event_category.rb +0 -23
  59. data/spec/dummy/app/models/exemplify.rb +0 -45
  60. data/spec/dummy/app/models/item.rb +0 -278
  61. data/spec/dummy/app/models/language.rb +0 -4
  62. data/spec/dummy/app/models/library.rb +0 -128
  63. data/spec/dummy/app/models/library_group.rb +0 -86
  64. data/spec/dummy/app/models/manifestation.rb +0 -13
  65. data/spec/dummy/app/models/patron.rb +0 -168
  66. data/spec/dummy/app/models/patron_type.rb +0 -19
  67. data/spec/dummy/app/models/request_status_type.rb +0 -19
  68. data/spec/dummy/app/models/request_type.rb +0 -18
  69. data/spec/dummy/app/models/shelf.rb +0 -54
@@ -0,0 +1,11 @@
1
+ class AddPositionToPatronRelationship < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestation_relationships, :position, :integer
4
+ add_column :patron_relationships, :position, :integer
5
+ end
6
+
7
+ def self.down
8
+ remove_column :patron_relationships, :position
9
+ remove_column :manifestation_relationships, :position
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class AddPubDateToManifestation < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestations, :pub_date, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :manifestations, :pub_date
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class AddBirthDateAndDeathDateToPatron < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :patrons, :birth_date, :string
4
+ add_column :patrons, :death_date, :string
5
+ end
6
+
7
+ def self.down
8
+ remove_column :patrons, :death_date
9
+ remove_column :patrons, :birth_date
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class AddIssnToSeriesStatement < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :series_statements, :issn, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :series_statements, :issn
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddPeriodicalToSeriesStatement < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :series_statements, :periodical, :boolean
4
+ end
5
+
6
+ def self.down
7
+ remove_column :series_statements, :periodical
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddEditionStringToManifestation < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestations, :edition_string, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :manifestations, :edition_string
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateSeriesStatementMergeLists < ActiveRecord::Migration
2
+ def change
3
+ create_table :series_statement_merge_lists do |t|
4
+ t.string :title
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ class CreateSeriesStatementMerges < ActiveRecord::Migration
2
+ def change
3
+ create_table :series_statement_merges do |t|
4
+ t.integer :series_statement_id, :null => false
5
+ t.integer :series_statement_merge_list_id, :null => false
6
+
7
+ t.timestamps
8
+ end
9
+ add_index :series_statement_merges, :series_statement_id
10
+ add_index :series_statement_merges, :series_statement_merge_list_id
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ class CreateSeriesHasManifestations < ActiveRecord::Migration
2
+ def change
3
+ create_table :series_has_manifestations do |t|
4
+ t.integer :series_statement_id
5
+ t.integer :manifestation_id
6
+ t.integer :position
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :series_has_manifestations, :series_statement_id
11
+ add_index :series_has_manifestations, :manifestation_id
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class RenameManifestationNumberListToNumberString < ActiveRecord::Migration
2
+ def self.up
3
+ rename_column :manifestations, :volume_number_list, :volume_number_string
4
+ rename_column :manifestations, :issue_number_list, :issue_number_string
5
+ rename_column :manifestations, :serial_number_list, :serial_number_string
6
+ end
7
+
8
+ def self.down
9
+ rename_column :manifestations, :serial_number_string, :serial_number_list
10
+ rename_column :manifestations, :issue_number_string, :issue_number_list
11
+ rename_column :manifestations, :volume_number_string, :volume_number_list
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ class AddManifestaitonIdToSeriesStatement < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :series_statements, :manifestation_id, :integer
4
+ add_index :series_statements, :manifestation_id
5
+ end
6
+
7
+ def self.down
8
+ remove_column :series_statements, :manifestation_id
9
+ end
10
+ end
@@ -0,0 +1,13 @@
1
+ class RenameSeriesStatementManifestationIdToRootManifestationId < ActiveRecord::Migration
2
+ def self.up
3
+ remove_index :series_statements, :series_statement_identifier
4
+ rename_column :series_statements, :manifestation_id, :root_manifestation_id
5
+ add_index :series_statements, :series_statement_identifier
6
+ end
7
+
8
+ def self.down
9
+ remove_index :series_statements, :series_statement_identifier
10
+ rename_column :series_statements, :root_manifestation_id, :manifestation_id
11
+ add_index :series_statements, :series_statement_identifier
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ class AddNoteToSeriesStatement < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :series_statements, :note, :text
4
+ end
5
+
6
+ def self.down
7
+ remove_column :series_statements, :note
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ class CreateCreateTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :create_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,12 @@
1
+ class CreateRealizeTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :realize_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,12 @@
1
+ class CreateProduceTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :produce_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,7 @@
1
+ class AddCreateTypeToCreate < ActiveRecord::Migration
2
+ def change
3
+ add_column :creates, :create_type_id, :integer
4
+ add_column :realizes, :realize_type_id, :integer
5
+ add_column :produces, :produce_type_id, :integer
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ class AddTitleSubseriesTranscriptionToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :title_subseries_transcription, :text
4
+
5
+ end
6
+ end
@@ -132,6 +132,42 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
132
132
  t.datetime "updated_at", :null => false
133
133
  end
134
134
 
135
+ create_table "countries", :force => true do |t|
136
+ t.string "name", :null => false
137
+ t.text "display_name"
138
+ t.string "alpha_2"
139
+ t.string "alpha_3"
140
+ t.string "numeric_3"
141
+ t.text "note"
142
+ t.integer "position"
143
+ end
144
+
145
+ add_index "countries", ["alpha_2"], :name => "index_countries_on_alpha_2"
146
+ add_index "countries", ["alpha_3"], :name => "index_countries_on_alpha_3"
147
+ add_index "countries", ["name"], :name => "index_countries_on_name"
148
+ add_index "countries", ["numeric_3"], :name => "index_countries_on_numeric_3"
149
+
150
+ create_table "create_types", :force => true do |t|
151
+ t.string "name"
152
+ t.text "display_name"
153
+ t.text "note"
154
+ t.integer "position"
155
+ t.datetime "created_at", :null => false
156
+ t.datetime "updated_at", :null => false
157
+ end
158
+
159
+ create_table "creates", :force => true do |t|
160
+ t.integer "patron_id", :null => false
161
+ t.integer "work_id", :null => false
162
+ t.integer "position"
163
+ t.datetime "created_at", :null => false
164
+ t.datetime "updated_at", :null => false
165
+ t.integer "create_type_id"
166
+ end
167
+
168
+ add_index "creates", ["patron_id"], :name => "index_creates_on_patron_id"
169
+ add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
170
+
135
171
  create_table "delayed_jobs", :force => true do |t|
136
172
  t.integer "priority", :default => 0
137
173
  t.integer "attempts", :default => 0
@@ -148,6 +184,16 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
148
184
 
149
185
  add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
150
186
 
187
+ create_table "donates", :force => true do |t|
188
+ t.integer "patron_id", :null => false
189
+ t.integer "item_id", :null => false
190
+ t.datetime "created_at", :null => false
191
+ t.datetime "updated_at", :null => false
192
+ end
193
+
194
+ add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
195
+ add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
196
+
151
197
  create_table "event_categories", :force => true do |t|
152
198
  t.string "name", :null => false
153
199
  t.text "display_name"
@@ -177,7 +223,6 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
177
223
  create_table "exemplifies", :force => true do |t|
178
224
  t.integer "manifestation_id", :null => false
179
225
  t.integer "item_id", :null => false
180
- t.string "type"
181
226
  t.integer "position"
182
227
  t.datetime "created_at", :null => false
183
228
  t.datetime "updated_at", :null => false
@@ -185,7 +230,6 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
185
230
 
186
231
  add_index "exemplifies", ["item_id"], :name => "index_exemplifies_on_item_id", :unique => true
187
232
  add_index "exemplifies", ["manifestation_id"], :name => "index_exemplifies_on_manifestation_id"
188
- add_index "exemplifies", ["type"], :name => "index_exemplifies_on_type"
189
233
 
190
234
  create_table "item_has_use_restrictions", :force => true do |t|
191
235
  t.integer "item_id", :null => false
@@ -206,7 +250,6 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
206
250
  t.datetime "updated_at", :null => false
207
251
  t.datetime "deleted_at"
208
252
  t.integer "shelf_id", :default => 1, :null => false
209
- t.integer "basket_id"
210
253
  t.boolean "include_supplements", :default => false, :null => false
211
254
  t.integer "checkouts_count", :default => 0, :null => false
212
255
  t.integer "owns_count", :default => 0, :null => false
@@ -321,6 +364,27 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
321
364
 
322
365
  add_index "manifestation_checkout_stats", ["state"], :name => "index_manifestation_checkout_stats_on_state"
323
366
 
367
+ create_table "manifestation_relationship_types", :force => true do |t|
368
+ t.string "name", :null => false
369
+ t.text "display_name"
370
+ t.text "note"
371
+ t.integer "position"
372
+ t.datetime "created_at", :null => false
373
+ t.datetime "updated_at", :null => false
374
+ end
375
+
376
+ create_table "manifestation_relationships", :force => true do |t|
377
+ t.integer "parent_id"
378
+ t.integer "child_id"
379
+ t.integer "manifestation_relationship_type_id"
380
+ t.datetime "created_at", :null => false
381
+ t.datetime "updated_at", :null => false
382
+ t.integer "position"
383
+ end
384
+
385
+ add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
386
+ add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
387
+
324
388
  create_table "manifestation_reserve_stats", :force => true do |t|
325
389
  t.datetime "start_date"
326
390
  t.datetime "end_date"
@@ -335,20 +399,20 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
335
399
  add_index "manifestation_reserve_stats", ["state"], :name => "index_manifestation_reserve_stats_on_state"
336
400
 
337
401
  create_table "manifestations", :force => true do |t|
338
- t.text "original_title", :null => false
402
+ t.text "original_title", :null => false
339
403
  t.text "title_alternative"
340
404
  t.text "title_transcription"
341
405
  t.string "classification_number"
342
406
  t.string "manifestation_identifier"
343
407
  t.datetime "date_of_publication"
344
- t.datetime "copyright_date"
345
- t.datetime "created_at", :null => false
346
- t.datetime "updated_at", :null => false
408
+ t.datetime "date_copyrighted"
409
+ t.datetime "created_at", :null => false
410
+ t.datetime "updated_at", :null => false
347
411
  t.datetime "deleted_at"
348
412
  t.string "access_address"
349
- t.integer "language_id", :default => 1, :null => false
350
- t.integer "carrier_type_id", :default => 1, :null => false
351
- t.integer "extent_id", :default => 1, :null => false
413
+ t.integer "language_id", :default => 1, :null => false
414
+ t.integer "carrier_type_id", :default => 1, :null => false
415
+ t.integer "extent_id", :default => 1, :null => false
352
416
  t.integer "start_page"
353
417
  t.integer "end_page"
354
418
  t.integer "height"
@@ -363,22 +427,32 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
363
427
  t.string "issn"
364
428
  t.integer "price"
365
429
  t.text "fulltext"
366
- t.string "volume_number_list"
367
- t.string "issue_number_list"
368
- t.string "serial_number_list"
430
+ t.string "volume_number_string"
431
+ t.string "issue_number_string"
432
+ t.string "serial_number_string"
369
433
  t.integer "edition"
370
434
  t.text "note"
371
- t.integer "produces_count", :default => 0, :null => false
372
- t.integer "exemplifies_count", :default => 0, :null => false
373
- t.integer "embodies_count", :default => 0, :null => false
374
- t.integer "work_has_subjects_count", :default => 0, :null => false
375
- t.boolean "repository_content", :default => false, :null => false
376
- t.integer "lock_version", :default => 0, :null => false
377
- t.integer "required_role_id", :default => 1, :null => false
435
+ t.integer "produces_count", :default => 0, :null => false
436
+ t.integer "exemplifies_count", :default => 0, :null => false
437
+ t.integer "embodies_count", :default => 0, :null => false
438
+ t.integer "work_has_subjects_count", :default => 0, :null => false
439
+ t.boolean "repository_content", :default => false, :null => false
440
+ t.integer "lock_version", :default => 0, :null => false
441
+ t.integer "required_role_id", :default => 1, :null => false
378
442
  t.string "state"
379
- t.integer "required_score", :default => 0, :null => false
380
- t.integer "frequency_id", :default => 1, :null => false
381
- t.boolean "subscription_master", :default => false, :null => false
443
+ t.integer "required_score", :default => 0, :null => false
444
+ t.integer "frequency_id", :default => 1, :null => false
445
+ t.boolean "subscription_master", :default => false, :null => false
446
+ t.text "title_alternative_transcription"
447
+ t.text "description"
448
+ t.text "abstract"
449
+ t.datetime "available_at"
450
+ t.datetime "valid_until"
451
+ t.datetime "date_submitted"
452
+ t.datetime "date_accepted"
453
+ t.datetime "date_caputured"
454
+ t.string "pub_date"
455
+ t.string "edition_string"
382
456
  t.integer "volume_number"
383
457
  t.integer "issue_number"
384
458
  t.integer "serial_number"
@@ -442,6 +516,38 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
442
516
  add_index "messages", ["receiver_id"], :name => "index_messages_on_receiver_id"
443
517
  add_index "messages", ["sender_id"], :name => "index_messages_on_sender_id"
444
518
 
519
+ create_table "owns", :force => true do |t|
520
+ t.integer "patron_id", :null => false
521
+ t.integer "item_id", :null => false
522
+ t.integer "position"
523
+ t.datetime "created_at", :null => false
524
+ t.datetime "updated_at", :null => false
525
+ end
526
+
527
+ add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
528
+ add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
529
+
530
+ create_table "patron_relationship_types", :force => true do |t|
531
+ t.string "name", :null => false
532
+ t.text "display_name"
533
+ t.text "note"
534
+ t.integer "position"
535
+ t.datetime "created_at", :null => false
536
+ t.datetime "updated_at", :null => false
537
+ end
538
+
539
+ create_table "patron_relationships", :force => true do |t|
540
+ t.integer "parent_id"
541
+ t.integer "child_id"
542
+ t.integer "patron_relationship_type_id"
543
+ t.datetime "created_at", :null => false
544
+ t.datetime "updated_at", :null => false
545
+ t.integer "position"
546
+ end
547
+
548
+ add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
549
+ add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
550
+
445
551
  create_table "patron_types", :force => true do |t|
446
552
  t.string "name", :null => false
447
553
  t.text "display_name"
@@ -464,8 +570,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
464
570
  t.string "full_name"
465
571
  t.text "full_name_transcription"
466
572
  t.text "full_name_alternative"
467
- t.datetime "created_at", :null => false
468
- t.datetime "updated_at", :null => false
573
+ t.datetime "created_at", :null => false
574
+ t.datetime "updated_at", :null => false
469
575
  t.datetime "deleted_at"
470
576
  t.string "zip_code_1"
471
577
  t.string "zip_code_2"
@@ -485,20 +591,23 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
485
591
  t.text "region"
486
592
  t.datetime "date_of_birth"
487
593
  t.datetime "date_of_death"
488
- t.integer "language_id", :default => 1, :null => false
489
- t.integer "country_id", :default => 1, :null => false
490
- t.integer "patron_type_id", :default => 1, :null => false
491
- t.integer "lock_version", :default => 0, :null => false
492
- t.text "note"
493
- t.integer "creates_count", :default => 0, :null => false
494
- t.integer "realizes_count", :default => 0, :null => false
495
- t.integer "produces_count", :default => 0, :null => false
496
- t.integer "owns_count", :default => 0, :null => false
497
- t.integer "required_role_id", :default => 1, :null => false
498
- t.integer "required_score", :default => 0, :null => false
594
+ t.integer "language_id", :default => 1, :null => false
595
+ t.integer "country_id", :default => 1, :null => false
596
+ t.integer "patron_type_id", :default => 1, :null => false
597
+ t.integer "lock_version", :default => 0, :null => false
598
+ t.text "note"
599
+ t.integer "creates_count", :default => 0, :null => false
600
+ t.integer "realizes_count", :default => 0, :null => false
601
+ t.integer "produces_count", :default => 0, :null => false
602
+ t.integer "owns_count", :default => 0, :null => false
603
+ t.integer "required_role_id", :default => 1, :null => false
604
+ t.integer "required_score", :default => 0, :null => false
499
605
  t.string "state"
500
606
  t.text "email"
501
607
  t.text "url"
608
+ t.text "full_name_alternative_transcription"
609
+ t.string "birth_date"
610
+ t.string "death_date"
502
611
  end
503
612
 
504
613
  add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
@@ -507,6 +616,48 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
507
616
  add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
508
617
  add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
509
618
 
619
+ create_table "produce_types", :force => true do |t|
620
+ t.string "name"
621
+ t.text "display_name"
622
+ t.text "note"
623
+ t.integer "position"
624
+ t.datetime "created_at", :null => false
625
+ t.datetime "updated_at", :null => false
626
+ end
627
+
628
+ create_table "produces", :force => true do |t|
629
+ t.integer "patron_id", :null => false
630
+ t.integer "manifestation_id", :null => false
631
+ t.integer "position"
632
+ t.datetime "created_at", :null => false
633
+ t.datetime "updated_at", :null => false
634
+ t.integer "produce_type_id"
635
+ end
636
+
637
+ add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
638
+ add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
639
+
640
+ create_table "realize_types", :force => true do |t|
641
+ t.string "name"
642
+ t.text "display_name"
643
+ t.text "note"
644
+ t.integer "position"
645
+ t.datetime "created_at", :null => false
646
+ t.datetime "updated_at", :null => false
647
+ end
648
+
649
+ create_table "realizes", :force => true do |t|
650
+ t.integer "patron_id", :null => false
651
+ t.integer "expression_id", :null => false
652
+ t.integer "position"
653
+ t.datetime "created_at", :null => false
654
+ t.datetime "updated_at", :null => false
655
+ t.integer "realize_type_id"
656
+ end
657
+
658
+ add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
659
+ add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
660
+
510
661
  create_table "request_status_types", :force => true do |t|
511
662
  t.string "name", :null => false
512
663
  t.text "display_name"
@@ -577,6 +728,54 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
577
728
  t.datetime "updated_at", :null => false
578
729
  end
579
730
 
731
+ create_table "series_has_manifestations", :force => true do |t|
732
+ t.integer "series_statement_id"
733
+ t.integer "manifestation_id"
734
+ t.integer "position"
735
+ t.datetime "created_at", :null => false
736
+ t.datetime "updated_at", :null => false
737
+ end
738
+
739
+ add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
740
+ add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
741
+
742
+ create_table "series_statement_merge_lists", :force => true do |t|
743
+ t.string "title"
744
+ t.datetime "created_at", :null => false
745
+ t.datetime "updated_at", :null => false
746
+ end
747
+
748
+ create_table "series_statement_merges", :force => true do |t|
749
+ t.integer "series_statement_id", :null => false
750
+ t.integer "series_statement_merge_list_id", :null => false
751
+ t.datetime "created_at", :null => false
752
+ t.datetime "updated_at", :null => false
753
+ end
754
+
755
+ add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
756
+ add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
757
+
758
+ create_table "series_statements", :force => true do |t|
759
+ t.text "original_title"
760
+ t.text "numbering"
761
+ t.text "title_subseries"
762
+ t.text "numbering_subseries"
763
+ t.integer "position"
764
+ t.datetime "created_at", :null => false
765
+ t.datetime "updated_at", :null => false
766
+ t.text "title_transcription"
767
+ t.text "title_alternative"
768
+ t.string "series_statement_identifier"
769
+ t.string "issn"
770
+ t.boolean "periodical"
771
+ t.integer "root_manifestation_id"
772
+ t.text "note"
773
+ t.text "title_subseries_transcription"
774
+ end
775
+
776
+ add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
777
+ add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
778
+
580
779
  create_table "shelves", :force => true do |t|
581
780
  t.string "name", :null => false
582
781
  t.text "display_name"
@@ -698,4 +897,15 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
698
897
  add_index "users", ["email"], :name => "index_users_on_email"
699
898
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
700
899
 
900
+ create_table "versions", :force => true do |t|
901
+ t.string "item_type", :null => false
902
+ t.integer "item_id", :null => false
903
+ t.string "event", :null => false
904
+ t.string "whodunnit"
905
+ t.text "object"
906
+ t.datetime "created_at"
907
+ end
908
+
909
+ add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
910
+
701
911
  end