enju_question 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/app/views/answers/index.html.erb +1 -1
  2. data/app/views/questions/_list.html.erb +2 -2
  3. data/lib/enju_question/engine.rb +1 -6
  4. data/lib/enju_question/version.rb +1 -1
  5. data/spec/cassette_library/enju_ndl/crd.yml +8 -95
  6. data/spec/dummy/config/application.rb +2 -1
  7. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  8. data/spec/dummy/db/development.sqlite3 +0 -0
  9. data/spec/dummy/db/migrate/001_create_patrons.rb +53 -0
  10. data/spec/dummy/db/migrate/005_create_manifestations.rb +56 -0
  11. data/spec/dummy/db/migrate/006_create_items.rb +1 -9
  12. data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
  13. data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
  14. data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
  15. data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
  16. data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
  17. data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
  18. data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
  19. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
  20. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
  21. data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +12 -0
  22. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
  23. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
  24. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
  25. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +22 -0
  26. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +22 -0
  27. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
  28. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
  29. data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
  30. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
  31. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
  32. data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
  33. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
  34. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
  35. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
  36. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
  37. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +15 -0
  38. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
  39. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
  40. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
  41. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
  42. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
  43. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
  44. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
  45. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +12 -0
  46. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
  47. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
  48. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
  49. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +9 -0
  50. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  51. data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +9 -0
  52. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
  53. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
  54. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
  55. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
  56. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +13 -0
  57. data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
  58. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
  59. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
  60. data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +13 -0
  61. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
  62. data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +9 -0
  63. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
  64. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
  65. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
  66. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
  67. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
  68. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
  69. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
  70. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
  71. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
  72. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
  73. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
  74. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +5 -0
  75. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
  76. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +5 -0
  77. data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +9 -0
  78. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +9 -0
  79. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
  80. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
  81. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +5 -0
  82. data/spec/dummy/db/schema.rb +536 -18
  83. data/spec/dummy/db/test.sqlite3 +0 -0
  84. data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
  85. data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
  86. data/spec/dummy/solr/data/test/index/_0.fnm +3 -0
  87. data/spec/dummy/solr/data/test/index/_0.frq +1 -0
  88. data/spec/dummy/solr/data/test/index/_0.nrm +1 -0
  89. data/spec/dummy/solr/data/test/index/_0.prx +0 -0
  90. data/spec/dummy/solr/data/test/index/_0.tii +0 -0
  91. data/spec/dummy/solr/data/test/index/_0.tis +0 -0
  92. data/spec/dummy/solr/data/test/index/_0_1.del +0 -0
  93. data/spec/dummy/solr/data/test/index/_1.fdt +0 -0
  94. data/spec/dummy/solr/data/test/index/_1.fdx +0 -0
  95. data/spec/dummy/solr/data/test/index/_1.fnm +3 -0
  96. data/spec/dummy/solr/data/test/index/_1.frq +1 -0
  97. data/spec/dummy/solr/data/test/index/_1.nrm +1 -0
  98. data/spec/dummy/solr/data/test/index/_1.prx +0 -0
  99. data/spec/dummy/solr/data/test/index/_1.tii +0 -0
  100. data/spec/dummy/solr/data/test/index/_1.tis +0 -0
  101. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  102. data/spec/dummy/solr/data/test/index/segments_3 +0 -0
  103. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  104. metadata +224 -18
  105. data/spec/dummy/app/models/item.rb +0 -5
  106. data/spec/dummy/db/migrate/20111201121636_create_languages.rb +0 -16
  107. data/spec/dummy/lib/expire_editable_fragment.rb +0 -62
  108. data/spec/dummy/solr/data/test/index/segments_1 +0 -0
@@ -0,0 +1,12 @@
1
+ class CreatePatronImportResults < ActiveRecord::Migration
2
+ def change
3
+ create_table :patron_import_results do |t|
4
+ t.integer :patron_import_file_id
5
+ t.integer :patron_id
6
+ t.integer :user_id
7
+ t.text :body
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ class AddAcquiredAtToItem < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :items, :acquired_at, :timestamp
4
+ end
5
+
6
+ def self.down
7
+ remove_column :items, :acquired_at
8
+ end
9
+ 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 AddEditModeToResourceImportFile < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :resource_import_files, :edit_mode, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :resource_import_files, :edit_mode
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,11 @@
1
+ class AddBookstoreIdToItem < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :items, :bookstore_id, :integer
4
+ add_index :items, :bookstore_id
5
+ end
6
+
7
+ def self.down
8
+ remove_index :items, :bookstore_id
9
+ remove_column :items, :bookstore_id
10
+ end
11
+ 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,13 @@
1
+ class AddVolumeNumberToManifestation < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestations, :volume_number, :integer
4
+ add_column :manifestations, :issue_number, :integer
5
+ add_column :manifestations, :serial_number, :integer
6
+ end
7
+
8
+ def self.down
9
+ remove_column :manifestations, :serial_number
10
+ remove_column :manifestations, :issue_number
11
+ remove_column :manifestations, :volume_number
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,9 @@
1
+ class AddNdcToManifestation < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :manifestations, :ndc, :string
4
+ end
5
+
6
+ def self.down
7
+ remove_column :manifestations, :ndc
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
@@ -0,0 +1,6 @@
1
+ class AddBudgetTypeIdToItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :items, :budget_type_id, :integer
4
+
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddContentTypeIdToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :content_type_id, :integer, :default => 1
4
+
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddYearOfPublicationToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :year_of_publication, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddPictureMetaToPictureFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :picture_files, :picture_meta, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddFingerprintToPictureFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :picture_files, :picture_fingerprint, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddFingerprintToResourceImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :resource_import_files, :resource_import_fingerprint, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddFingerprintToPatronImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :patron_import_files, :patron_import_fingerprint, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToResourceImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :resource_import_files, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToPatronImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :patron_import_files, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class RenameResourceImportFileImportedAtToExecutedAt < ActiveRecord::Migration
2
+ def up
3
+ rename_column :resource_import_files, :imported_at, :executed_at
4
+ end
5
+
6
+ def down
7
+ rename_column :resource_import_files, :executed_at, :imported_at
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class RenamePatronImportFileImportedAtToExecutedAt < ActiveRecord::Migration
2
+ def up
3
+ rename_column :patron_import_files, :imported_at, :executed_at
4
+ end
5
+
6
+ def down
7
+ rename_column :patron_import_files, :executed_at, :imported_at
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddAttachmentMetaToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :attachment_meta, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddMonthOfPublicationToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :month_of_publication, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddEditModeToPatronImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :patron_import_files, :edit_mode, :string
4
+ end
5
+ 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 => 20120418124018) do
14
+ ActiveRecord::Schema.define(:version => 20120602141129) do
15
15
 
16
16
  create_table "answer_has_items", :force => true do |t|
17
17
  t.integer "answer_id"
@@ -40,29 +40,144 @@ ActiveRecord::Schema.define(:version => 20120418124018) do
40
40
  add_index "answers", ["question_id"], :name => "index_answers_on_question_id"
41
41
  add_index "answers", ["user_id"], :name => "index_answers_on_user_id"
42
42
 
43
+ create_table "carrier_types", :force => true do |t|
44
+ t.string "name", :null => false
45
+ t.text "display_name"
46
+ t.text "note"
47
+ t.integer "position"
48
+ t.datetime "created_at", :null => false
49
+ t.datetime "updated_at", :null => false
50
+ end
51
+
52
+ create_table "content_types", :force => true do |t|
53
+ t.string "name", :null => false
54
+ t.text "display_name"
55
+ t.text "note"
56
+ t.integer "position"
57
+ t.datetime "created_at", :null => false
58
+ t.datetime "updated_at", :null => false
59
+ end
60
+
61
+ create_table "countries", :force => true do |t|
62
+ t.string "name", :null => false
63
+ t.text "display_name"
64
+ t.string "alpha_2"
65
+ t.string "alpha_3"
66
+ t.string "numeric_3"
67
+ t.text "note"
68
+ t.integer "position"
69
+ end
70
+
71
+ add_index "countries", ["alpha_2"], :name => "index_countries_on_alpha_2"
72
+ add_index "countries", ["alpha_3"], :name => "index_countries_on_alpha_3"
73
+ add_index "countries", ["name"], :name => "index_countries_on_name"
74
+ add_index "countries", ["numeric_3"], :name => "index_countries_on_numeric_3"
75
+
76
+ create_table "create_types", :force => true do |t|
77
+ t.string "name"
78
+ t.text "display_name"
79
+ t.text "note"
80
+ t.integer "position"
81
+ t.datetime "created_at", :null => false
82
+ t.datetime "updated_at", :null => false
83
+ end
84
+
85
+ create_table "creates", :force => true do |t|
86
+ t.integer "patron_id", :null => false
87
+ t.integer "work_id", :null => false
88
+ t.integer "position"
89
+ t.datetime "created_at", :null => false
90
+ t.datetime "updated_at", :null => false
91
+ t.integer "create_type_id"
92
+ end
93
+
94
+ add_index "creates", ["patron_id"], :name => "index_creates_on_patron_id"
95
+ add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
96
+
97
+ create_table "donates", :force => true do |t|
98
+ t.integer "patron_id", :null => false
99
+ t.integer "item_id", :null => false
100
+ t.datetime "created_at", :null => false
101
+ t.datetime "updated_at", :null => false
102
+ end
103
+
104
+ add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
105
+ add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
106
+
107
+ create_table "exemplifies", :force => true do |t|
108
+ t.integer "manifestation_id", :null => false
109
+ t.integer "item_id", :null => false
110
+ t.integer "position"
111
+ t.datetime "created_at", :null => false
112
+ t.datetime "updated_at", :null => false
113
+ end
114
+
115
+ add_index "exemplifies", ["item_id"], :name => "index_exemplifies_on_item_id", :unique => true
116
+ add_index "exemplifies", ["manifestation_id"], :name => "index_exemplifies_on_manifestation_id"
117
+
118
+ create_table "extents", :force => true do |t|
119
+ t.string "name", :null => false
120
+ t.text "display_name"
121
+ t.text "note"
122
+ t.integer "position"
123
+ t.datetime "created_at", :null => false
124
+ t.datetime "updated_at", :null => false
125
+ end
126
+
127
+ create_table "form_of_works", :force => true do |t|
128
+ t.string "name", :null => false
129
+ t.text "display_name"
130
+ t.text "note"
131
+ t.integer "position"
132
+ t.datetime "created_at", :null => false
133
+ t.datetime "updated_at", :null => false
134
+ end
135
+
136
+ create_table "frequencies", :force => true do |t|
137
+ t.string "name", :null => false
138
+ t.text "display_name"
139
+ t.text "note"
140
+ t.integer "position"
141
+ t.datetime "created_at", :null => false
142
+ t.datetime "updated_at", :null => false
143
+ end
144
+
145
+ create_table "import_requests", :force => true do |t|
146
+ t.string "isbn"
147
+ t.string "state"
148
+ t.integer "manifestation_id"
149
+ t.integer "user_id"
150
+ t.datetime "created_at", :null => false
151
+ t.datetime "updated_at", :null => false
152
+ end
153
+
154
+ add_index "import_requests", ["isbn"], :name => "index_import_requests_on_isbn"
155
+ add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
156
+ add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
157
+
43
158
  create_table "items", :force => true do |t|
44
159
  t.string "call_number"
45
160
  t.string "item_identifier"
46
- t.integer "circulation_status_id", :default => 5, :null => false
47
- t.integer "checkout_type_id", :default => 1, :null => false
48
- t.datetime "created_at", :null => false
49
- t.datetime "updated_at", :null => false
161
+ t.integer "circulation_status_id", :default => 5, :null => false
162
+ t.integer "checkout_type_id", :default => 1, :null => false
163
+ t.datetime "created_at", :null => false
164
+ t.datetime "updated_at", :null => false
50
165
  t.datetime "deleted_at"
51
- t.integer "shelf_id", :default => 1, :null => false
52
- t.integer "basket_id"
53
- t.boolean "include_supplements", :default => false, :null => false
54
- t.integer "checkouts_count", :default => 0, :null => false
55
- t.integer "owns_count", :default => 0, :null => false
56
- t.integer "resource_has_subjects_count", :default => 0, :null => false
166
+ t.integer "shelf_id", :default => 1, :null => false
167
+ t.boolean "include_supplements", :default => false, :null => false
57
168
  t.text "note"
58
169
  t.string "url"
59
170
  t.integer "price"
60
- t.integer "lock_version", :default => 0, :null => false
61
- t.integer "required_role_id", :default => 1, :null => false
171
+ t.integer "lock_version", :default => 0, :null => false
172
+ t.integer "required_role_id", :default => 1, :null => false
62
173
  t.string "state"
63
- t.integer "required_score", :default => 0, :null => false
174
+ t.integer "required_score", :default => 0, :null => false
175
+ t.datetime "acquired_at"
176
+ t.integer "bookstore_id"
177
+ t.integer "budget_type_id"
64
178
  end
65
179
 
180
+ add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
66
181
  add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
67
182
  add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
68
183
  add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
@@ -70,18 +185,305 @@ ActiveRecord::Schema.define(:version => 20120418124018) do
70
185
  add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
71
186
 
72
187
  create_table "languages", :force => true do |t|
188
+ t.string "name", :null => false
189
+ t.string "native_name"
190
+ t.text "display_name"
191
+ t.string "iso_639_1"
192
+ t.string "iso_639_2"
193
+ t.string "iso_639_3"
194
+ t.text "note"
195
+ t.integer "position"
196
+ end
197
+
198
+ add_index "languages", ["iso_639_1"], :name => "index_languages_on_iso_639_1"
199
+ add_index "languages", ["iso_639_2"], :name => "index_languages_on_iso_639_2"
200
+ add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
201
+ add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
202
+
203
+ create_table "licenses", :force => true do |t|
204
+ t.string "name", :null => false
205
+ t.string "display_name"
206
+ t.text "note"
207
+ t.integer "position"
208
+ t.datetime "created_at", :null => false
209
+ t.datetime "updated_at", :null => false
210
+ end
211
+
212
+ create_table "manifestation_relationship_types", :force => true do |t|
213
+ t.string "name", :null => false
214
+ t.text "display_name"
215
+ t.text "note"
216
+ t.integer "position"
217
+ t.datetime "created_at", :null => false
218
+ t.datetime "updated_at", :null => false
219
+ end
220
+
221
+ create_table "manifestation_relationships", :force => true do |t|
222
+ t.integer "parent_id"
223
+ t.integer "child_id"
224
+ t.integer "manifestation_relationship_type_id"
225
+ t.datetime "created_at", :null => false
226
+ t.datetime "updated_at", :null => false
227
+ t.integer "position"
228
+ end
229
+
230
+ add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
231
+ add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
232
+
233
+ create_table "manifestations", :force => true do |t|
234
+ t.text "original_title", :null => false
235
+ t.text "title_alternative"
236
+ t.text "title_transcription"
237
+ t.string "classification_number"
238
+ t.string "manifestation_identifier"
239
+ t.datetime "date_of_publication"
240
+ t.datetime "date_copyrighted"
241
+ t.datetime "created_at", :null => false
242
+ t.datetime "updated_at", :null => false
243
+ t.datetime "deleted_at"
244
+ t.string "access_address"
245
+ t.integer "language_id", :default => 1, :null => false
246
+ t.integer "carrier_type_id", :default => 1, :null => false
247
+ t.integer "extent_id", :default => 1, :null => false
248
+ t.integer "start_page"
249
+ t.integer "end_page"
250
+ t.integer "height"
251
+ t.integer "width"
252
+ t.integer "depth"
253
+ t.string "isbn"
254
+ t.string "isbn10"
255
+ t.string "wrong_isbn"
256
+ t.string "nbn"
257
+ t.string "lccn"
258
+ t.string "oclc_number"
259
+ t.string "issn"
260
+ t.integer "price"
261
+ t.text "fulltext"
262
+ t.string "volume_number_string"
263
+ t.string "issue_number_string"
264
+ t.string "serial_number_string"
265
+ t.integer "edition"
266
+ t.text "note"
267
+ t.boolean "repository_content", :default => false, :null => false
268
+ t.integer "lock_version", :default => 0, :null => false
269
+ t.integer "required_role_id", :default => 1, :null => false
270
+ t.string "state"
271
+ t.integer "required_score", :default => 0, :null => false
272
+ t.integer "frequency_id", :default => 1, :null => false
273
+ t.boolean "subscription_master", :default => false, :null => false
274
+ t.string "attachment_file_name"
275
+ t.string "attachment_content_type"
276
+ t.integer "attachment_file_size"
277
+ t.datetime "attachment_updated_at"
278
+ t.text "title_alternative_transcription"
279
+ t.text "description"
280
+ t.text "abstract"
281
+ t.datetime "available_at"
282
+ t.datetime "valid_until"
283
+ t.datetime "date_submitted"
284
+ t.datetime "date_accepted"
285
+ t.datetime "date_caputured"
286
+ t.string "pub_date"
287
+ t.string "edition_string"
288
+ t.integer "volume_number"
289
+ t.integer "issue_number"
290
+ t.integer "serial_number"
291
+ t.string "ndc"
292
+ t.integer "content_type_id", :default => 1
293
+ t.integer "year_of_publication"
294
+ t.text "attachment_meta"
295
+ t.integer "month_of_publication"
296
+ end
297
+
298
+ add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
299
+ add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
300
+ add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
301
+ add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
302
+ add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
303
+ add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
304
+ add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
305
+ add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
306
+ add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
307
+ add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
308
+ add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
309
+
310
+ create_table "medium_of_performances", :force => true do |t|
311
+ t.string "name", :null => false
312
+ t.text "display_name"
313
+ t.text "note"
314
+ t.integer "position"
315
+ t.datetime "created_at", :null => false
316
+ t.datetime "updated_at", :null => false
317
+ end
318
+
319
+ create_table "owns", :force => true do |t|
320
+ t.integer "patron_id", :null => false
321
+ t.integer "item_id", :null => false
322
+ t.integer "position"
323
+ t.datetime "created_at", :null => false
324
+ t.datetime "updated_at", :null => false
325
+ end
326
+
327
+ add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
328
+ add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
329
+
330
+ create_table "patron_import_files", :force => true do |t|
331
+ t.integer "parent_id"
332
+ t.string "content_type"
333
+ t.integer "size"
334
+ t.integer "user_id"
335
+ t.text "note"
336
+ t.datetime "executed_at"
337
+ t.string "state"
338
+ t.string "patron_import_file_name"
339
+ t.string "patron_import_content_type"
340
+ t.integer "patron_import_file_size"
341
+ t.datetime "patron_import_updated_at"
342
+ t.datetime "created_at", :null => false
343
+ t.datetime "updated_at", :null => false
344
+ t.string "patron_import_fingerprint"
345
+ t.text "error_message"
346
+ t.string "edit_mode"
347
+ end
348
+
349
+ add_index "patron_import_files", ["parent_id"], :name => "index_patron_import_files_on_parent_id"
350
+ add_index "patron_import_files", ["state"], :name => "index_patron_import_files_on_state"
351
+ add_index "patron_import_files", ["user_id"], :name => "index_patron_import_files_on_user_id"
352
+
353
+ create_table "patron_import_results", :force => true do |t|
354
+ t.integer "patron_import_file_id"
355
+ t.integer "patron_id"
356
+ t.integer "user_id"
357
+ t.text "body"
358
+ t.datetime "created_at", :null => false
359
+ t.datetime "updated_at", :null => false
360
+ end
361
+
362
+ create_table "patron_relationship_types", :force => true do |t|
363
+ t.string "name", :null => false
364
+ t.text "display_name"
365
+ t.text "note"
366
+ t.integer "position"
367
+ t.datetime "created_at", :null => false
368
+ t.datetime "updated_at", :null => false
369
+ end
370
+
371
+ create_table "patron_relationships", :force => true do |t|
372
+ t.integer "parent_id"
373
+ t.integer "child_id"
374
+ t.integer "patron_relationship_type_id"
375
+ t.datetime "created_at", :null => false
376
+ t.datetime "updated_at", :null => false
377
+ t.integer "position"
378
+ end
379
+
380
+ add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
381
+ add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
382
+
383
+ create_table "patron_types", :force => true do |t|
384
+ t.string "name", :null => false
385
+ t.text "display_name"
386
+ t.text "note"
387
+ t.integer "position"
388
+ t.datetime "created_at", :null => false
389
+ t.datetime "updated_at", :null => false
390
+ end
391
+
392
+ create_table "patrons", :force => true do |t|
393
+ t.integer "user_id"
394
+ t.string "last_name"
395
+ t.string "middle_name"
396
+ t.string "first_name"
397
+ t.string "last_name_transcription"
398
+ t.string "middle_name_transcription"
399
+ t.string "first_name_transcription"
400
+ t.string "corporate_name"
401
+ t.string "corporate_name_transcription"
402
+ t.string "full_name"
403
+ t.text "full_name_transcription"
404
+ t.text "full_name_alternative"
405
+ t.datetime "created_at", :null => false
406
+ t.datetime "updated_at", :null => false
407
+ t.datetime "deleted_at"
408
+ t.string "zip_code_1"
409
+ t.string "zip_code_2"
410
+ t.text "address_1"
411
+ t.text "address_2"
412
+ t.text "address_1_note"
413
+ t.text "address_2_note"
414
+ t.string "telephone_number_1"
415
+ t.string "telephone_number_2"
416
+ t.string "fax_number_1"
417
+ t.string "fax_number_2"
418
+ t.text "other_designation"
419
+ t.text "place"
420
+ t.string "postal_code"
421
+ t.text "street"
422
+ t.text "locality"
423
+ t.text "region"
424
+ t.datetime "date_of_birth"
425
+ t.datetime "date_of_death"
426
+ t.integer "language_id", :default => 1, :null => false
427
+ t.integer "country_id", :default => 1, :null => false
428
+ t.integer "patron_type_id", :default => 1, :null => false
429
+ t.integer "lock_version", :default => 0, :null => false
430
+ t.text "note"
431
+ t.integer "required_role_id", :default => 1, :null => false
432
+ t.integer "required_score", :default => 0, :null => false
433
+ t.string "state"
434
+ t.text "email"
435
+ t.text "url"
436
+ t.text "full_name_alternative_transcription"
437
+ t.string "birth_date"
438
+ t.string "death_date"
439
+ end
440
+
441
+ add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
442
+ add_index "patrons", ["full_name"], :name => "index_patrons_on_full_name"
443
+ add_index "patrons", ["language_id"], :name => "index_patrons_on_language_id"
444
+ add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
445
+ add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
446
+
447
+ create_table "picture_files", :force => true do |t|
448
+ t.integer "picture_attachable_id"
449
+ t.string "picture_attachable_type"
450
+ t.string "content_type"
451
+ t.text "title"
452
+ t.string "thumbnail"
453
+ t.integer "position"
454
+ t.datetime "created_at", :null => false
455
+ t.datetime "updated_at", :null => false
456
+ t.string "picture_file_name"
457
+ t.string "picture_content_type"
458
+ t.integer "picture_file_size"
459
+ t.datetime "picture_updated_at"
460
+ t.text "picture_meta"
461
+ t.string "picture_fingerprint"
462
+ end
463
+
464
+ add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :name => "index_picture_files_on_picture_attachable_id_and_type"
465
+
466
+ create_table "produce_types", :force => true do |t|
73
467
  t.string "name"
74
- t.string "native_name"
75
468
  t.text "display_name"
76
- t.string "iso_639_1"
77
- t.string "iso_639_2"
78
- t.string "iso_639_3"
79
469
  t.text "note"
80
470
  t.integer "position"
81
471
  t.datetime "created_at", :null => false
82
472
  t.datetime "updated_at", :null => false
83
473
  end
84
474
 
475
+ create_table "produces", :force => true do |t|
476
+ t.integer "patron_id", :null => false
477
+ t.integer "manifestation_id", :null => false
478
+ t.integer "position"
479
+ t.datetime "created_at", :null => false
480
+ t.datetime "updated_at", :null => false
481
+ t.integer "produce_type_id"
482
+ end
483
+
484
+ add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
485
+ add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
486
+
85
487
  create_table "questions", :force => true do |t|
86
488
  t.integer "user_id", :null => false
87
489
  t.text "body"
@@ -97,6 +499,63 @@ ActiveRecord::Schema.define(:version => 20120418124018) do
97
499
 
98
500
  add_index "questions", ["user_id"], :name => "index_questions_on_user_id"
99
501
 
502
+ create_table "realize_types", :force => true do |t|
503
+ t.string "name"
504
+ t.text "display_name"
505
+ t.text "note"
506
+ t.integer "position"
507
+ t.datetime "created_at", :null => false
508
+ t.datetime "updated_at", :null => false
509
+ end
510
+
511
+ create_table "realizes", :force => true do |t|
512
+ t.integer "patron_id", :null => false
513
+ t.integer "expression_id", :null => false
514
+ t.integer "position"
515
+ t.datetime "created_at", :null => false
516
+ t.datetime "updated_at", :null => false
517
+ t.integer "realize_type_id"
518
+ end
519
+
520
+ add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
521
+ add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
522
+
523
+ create_table "resource_import_files", :force => true do |t|
524
+ t.integer "parent_id"
525
+ t.string "content_type"
526
+ t.integer "size"
527
+ t.integer "user_id"
528
+ t.text "note"
529
+ t.datetime "executed_at"
530
+ t.string "state"
531
+ t.string "resource_import_file_name"
532
+ t.string "resource_import_content_type"
533
+ t.integer "resource_import_file_size"
534
+ t.datetime "resource_import_updated_at"
535
+ t.datetime "created_at", :null => false
536
+ t.datetime "updated_at", :null => false
537
+ t.string "edit_mode"
538
+ t.string "resource_import_fingerprint"
539
+ t.text "error_message"
540
+ end
541
+
542
+ add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
543
+ add_index "resource_import_files", ["state"], :name => "index_resource_import_files_on_state"
544
+ add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
545
+
546
+ create_table "resource_import_results", :force => true do |t|
547
+ t.integer "resource_import_file_id"
548
+ t.integer "manifestation_id"
549
+ t.integer "item_id"
550
+ t.text "body"
551
+ t.datetime "created_at", :null => false
552
+ t.datetime "updated_at", :null => false
553
+ end
554
+
555
+ add_index "resource_import_results", ["item_id"], :name => "index_resource_import_results_on_item_id"
556
+ add_index "resource_import_results", ["manifestation_id"], :name => "index_resource_import_results_on_manifestation_id"
557
+ add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
558
+
100
559
  create_table "roles", :force => true do |t|
101
560
  t.string "name"
102
561
  t.text "display_name"
@@ -106,6 +565,54 @@ ActiveRecord::Schema.define(:version => 20120418124018) do
106
565
  t.datetime "updated_at", :null => false
107
566
  end
108
567
 
568
+ create_table "series_has_manifestations", :force => true do |t|
569
+ t.integer "series_statement_id"
570
+ t.integer "manifestation_id"
571
+ t.integer "position"
572
+ t.datetime "created_at", :null => false
573
+ t.datetime "updated_at", :null => false
574
+ end
575
+
576
+ add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
577
+ add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
578
+
579
+ create_table "series_statement_merge_lists", :force => true do |t|
580
+ t.string "title"
581
+ t.datetime "created_at", :null => false
582
+ t.datetime "updated_at", :null => false
583
+ end
584
+
585
+ create_table "series_statement_merges", :force => true do |t|
586
+ t.integer "series_statement_id", :null => false
587
+ t.integer "series_statement_merge_list_id", :null => false
588
+ t.datetime "created_at", :null => false
589
+ t.datetime "updated_at", :null => false
590
+ end
591
+
592
+ add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
593
+ add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
594
+
595
+ create_table "series_statements", :force => true do |t|
596
+ t.text "original_title"
597
+ t.text "numbering"
598
+ t.text "title_subseries"
599
+ t.text "numbering_subseries"
600
+ t.integer "position"
601
+ t.datetime "created_at", :null => false
602
+ t.datetime "updated_at", :null => false
603
+ t.text "title_transcription"
604
+ t.text "title_alternative"
605
+ t.string "series_statement_identifier"
606
+ t.string "issn"
607
+ t.boolean "periodical"
608
+ t.integer "root_manifestation_id"
609
+ t.text "note"
610
+ t.text "title_subseries_transcription"
611
+ end
612
+
613
+ add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
614
+ add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
615
+
109
616
  create_table "taggings", :force => true do |t|
110
617
  t.integer "tag_id"
111
618
  t.integer "taggable_id"
@@ -176,4 +683,15 @@ ActiveRecord::Schema.define(:version => 20120418124018) do
176
683
  add_index "users", ["email"], :name => "index_users_on_email"
177
684
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
178
685
 
686
+ create_table "versions", :force => true do |t|
687
+ t.string "item_type", :null => false
688
+ t.integer "item_id", :null => false
689
+ t.string "event", :null => false
690
+ t.string "whodunnit"
691
+ t.text "object"
692
+ t.datetime "created_at"
693
+ end
694
+
695
+ add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
696
+
179
697
  end