enju_bookmark 0.0.19 → 0.0.20

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/models/bookmark_sweeper.rb +1 -0
  2. data/app/views/bookmark_stat_has_manifestations/index.html.erb +1 -1
  3. data/app/views/bookmark_stats/index.html.erb +1 -1
  4. data/app/views/bookmarks/_index.html.erb +1 -1
  5. data/app/views/bookmarks/_index_user.html.erb +1 -1
  6. data/app/views/bookmarks/show.html.erb +1 -1
  7. data/lib/enju_bookmark.rb +2 -2
  8. data/lib/enju_bookmark/calculate_stat.rb +30 -0
  9. data/lib/enju_bookmark/expire_tag_cloud.rb +10 -0
  10. data/lib/enju_bookmark/version.rb +1 -1
  11. data/spec/dummy/app/models/user_has_role.rb +18 -0
  12. data/spec/dummy/config/application.rb +3 -0
  13. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  14. data/spec/dummy/db/migrate/001_create_patrons.rb +1 -10
  15. data/spec/dummy/db/migrate/005_create_manifestations.rb +4 -16
  16. data/spec/dummy/db/migrate/006_create_items.rb +1 -9
  17. data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
  18. data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
  19. data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
  20. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -7
  21. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -5
  22. data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -5
  23. data/spec/dummy/db/migrate/{20111201163342_create_user_groups.rb → 077_create_user_groups.rb} +2 -2
  24. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -6
  25. data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
  26. data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
  27. data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
  28. data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
  29. data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
  30. data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
  31. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
  32. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +1 -7
  33. data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +1 -5
  34. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  35. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
  36. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
  37. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
  38. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -5
  39. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
  40. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +22 -0
  41. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +22 -0
  42. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
  43. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
  44. data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
  45. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
  46. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +1 -5
  47. data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
  48. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
  49. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
  50. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
  51. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +2 -8
  52. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +15 -0
  53. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
  54. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
  55. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
  56. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
  57. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
  58. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
  59. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +12 -0
  60. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
  61. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
  62. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  63. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
  64. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
  65. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
  66. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +1 -5
  67. data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +9 -0
  68. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
  69. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
  70. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
  71. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
  72. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
  73. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
  74. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
  75. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
  76. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
  77. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
  78. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
  79. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
  80. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
  81. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +5 -0
  82. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
  83. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +5 -0
  84. data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +9 -0
  85. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +9 -0
  86. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
  87. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
  88. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  89. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +5 -0
  90. data/spec/dummy/db/schema.rb +520 -106
  91. data/spec/dummy/db/test.sqlite3 +0 -0
  92. data/spec/fixtures/libraries.yml +0 -5
  93. metadata +141 -139
  94. data/lib/enju_bookmark/master_model.rb +0 -41
  95. data/lib/enju_bookmark/url_validator.rb +0 -10
  96. data/spec/dummy/app/models/bookstore.rb +0 -31
  97. data/spec/dummy/app/models/carrier_type.rb +0 -33
  98. data/spec/dummy/app/models/exemplify.rb +0 -45
  99. data/spec/dummy/app/models/item.rb +0 -121
  100. data/spec/dummy/app/models/language.rb +0 -4
  101. data/spec/dummy/app/models/library.rb +0 -128
  102. data/spec/dummy/app/models/library_group.rb +0 -86
  103. data/spec/dummy/app/models/manifestation.rb +0 -396
  104. data/spec/dummy/app/models/patron.rb +0 -168
  105. data/spec/dummy/app/models/patron_type.rb +0 -19
  106. data/spec/dummy/app/models/series_has_manifestation.rb +0 -35
  107. data/spec/dummy/app/models/series_statement.rb +0 -88
  108. data/spec/dummy/app/models/shelf.rb +0 -54
@@ -0,0 +1,13 @@
1
+ class RenameSeriesStatementTitleToOriginalTitle < ActiveRecord::Migration
2
+ def self.up
3
+ rename_column :series_statements, :title, :original_title
4
+ add_column :series_statements, :title_transcription, :text
5
+ add_column :series_statements, :title_alternative, :text
6
+ end
7
+
8
+ def self.down
9
+ rename_column :series_statements, :original_title, :title
10
+ remove_column :series_statements, :title_transcription
11
+ remove_column :series_statements, :title_alternative
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class CreateManifestationRelationships < ActiveRecord::Migration
2
+ def change
3
+ create_table :manifestation_relationships do |t|
4
+ t.integer :parent_id
5
+ t.integer :child_id
6
+ t.integer :manifestation_relationship_type_id
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :manifestation_relationships, :parent_id
11
+ add_index :manifestation_relationships, :child_id
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class CreatePatronRelationships < ActiveRecord::Migration
2
+ def change
3
+ create_table :patron_relationships do |t|
4
+ t.integer :parent_id
5
+ t.integer :child_id
6
+ t.integer :patron_relationship_type_id
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :patron_relationships, :parent_id
11
+ add_index :patron_relationships, :child_id
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ class CreateManifestationRelationshipTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :manifestation_relationship_types do |t|
4
+ t.string :name, :null => false
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,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,15 @@
1
+ class CreateResourceImportResults < ActiveRecord::Migration
2
+ def change
3
+ create_table :resource_import_results do |t|
4
+ t.integer :resource_import_file_id
5
+ t.integer :manifestation_id
6
+ t.integer :item_id
7
+ t.text :body
8
+
9
+ t.timestamps
10
+ end
11
+ add_index :resource_import_results, :resource_import_file_id
12
+ add_index :resource_import_results, :manifestation_id
13
+ add_index :resource_import_results, :item_id
14
+ end
15
+ end
@@ -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,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 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,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
@@ -1,5 +1,5 @@
1
1
  class CreateSeriesHasManifestations < ActiveRecord::Migration
2
- def self.up
2
+ def change
3
3
  create_table :series_has_manifestations do |t|
4
4
  t.integer :series_statement_id
5
5
  t.integer :manifestation_id
@@ -10,8 +10,4 @@ class CreateSeriesHasManifestations < ActiveRecord::Migration
10
10
  add_index :series_has_manifestations, :series_statement_id
11
11
  add_index :series_has_manifestations, :manifestation_id
12
12
  end
13
-
14
- def self.down
15
- drop_table :series_has_manifestations
16
- end
17
13
  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,5 @@
1
+ class AddIsilToLibrary < ActiveRecord::Migration
2
+ def change
3
+ add_column :libraries, :isil, :string
4
+ end
5
+ 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,12 @@
1
+ class CreateBudgetTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :budget_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,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 AddClosedToShelf < ActiveRecord::Migration
2
+ def change
3
+ add_column :shelves, :closed, :boolean, :default => false, :null => false
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 => 20120424103932) do
14
+ ActiveRecord::Schema.define(:version => 20120602141129) do
15
15
 
16
16
  create_table "accepts", :force => true do |t|
17
17
  t.integer "basket_id"
@@ -38,8 +38,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
38
38
  t.integer "bookmark_stat_id", :null => false
39
39
  t.integer "manifestation_id", :null => false
40
40
  t.integer "bookmarks_count"
41
- t.datetime "created_at"
42
- t.datetime "updated_at"
41
+ t.datetime "created_at", :null => false
42
+ t.datetime "updated_at", :null => false
43
43
  end
44
44
 
45
45
  add_index "bookmark_stat_has_manifestations", ["bookmark_stat_id"], :name => "index_bookmark_stat_has_manifestations_on_bookmark_stat_id"
@@ -48,12 +48,12 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
48
48
  create_table "bookmark_stats", :force => true do |t|
49
49
  t.datetime "start_date"
50
50
  t.datetime "end_date"
51
- t.text "note"
52
- t.string "state"
53
51
  t.datetime "started_at"
54
52
  t.datetime "completed_at"
55
- t.datetime "created_at"
56
- t.datetime "updated_at"
53
+ t.text "note"
54
+ t.string "state"
55
+ t.datetime "created_at", :null => false
56
+ t.datetime "updated_at", :null => false
57
57
  end
58
58
 
59
59
  add_index "bookmark_stats", ["state"], :name => "index_bookmark_stats_on_state"
@@ -65,14 +65,37 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
65
65
  t.string "url"
66
66
  t.text "note"
67
67
  t.boolean "shared"
68
- t.datetime "created_at"
69
- t.datetime "updated_at"
68
+ t.datetime "created_at", :null => false
69
+ t.datetime "updated_at", :null => false
70
70
  end
71
71
 
72
72
  add_index "bookmarks", ["manifestation_id"], :name => "index_bookmarks_on_manifestation_id"
73
73
  add_index "bookmarks", ["url"], :name => "index_bookmarks_on_url"
74
74
  add_index "bookmarks", ["user_id"], :name => "index_bookmarks_on_user_id"
75
75
 
76
+ create_table "bookstores", :force => true do |t|
77
+ t.text "name", :null => false
78
+ t.string "zip_code"
79
+ t.text "address"
80
+ t.text "note"
81
+ t.string "telephone_number"
82
+ t.string "fax_number"
83
+ t.string "url"
84
+ t.integer "position"
85
+ t.datetime "deleted_at"
86
+ t.datetime "created_at", :null => false
87
+ t.datetime "updated_at", :null => false
88
+ end
89
+
90
+ create_table "budget_types", :force => true do |t|
91
+ t.string "name"
92
+ t.text "display_name"
93
+ t.text "note"
94
+ t.integer "position"
95
+ t.datetime "created_at", :null => false
96
+ t.datetime "updated_at", :null => false
97
+ end
98
+
76
99
  create_table "carrier_type_has_checkout_types", :force => true do |t|
77
100
  t.integer "carrier_type_id", :null => false
78
101
  t.integer "checkout_type_id", :null => false
@@ -90,8 +113,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
90
113
  t.text "display_name"
91
114
  t.text "note"
92
115
  t.integer "position"
93
- t.datetime "created_at"
94
- t.datetime "updated_at"
116
+ t.datetime "created_at", :null => false
117
+ t.datetime "updated_at", :null => false
95
118
  end
96
119
 
97
120
  create_table "checked_items", :force => true do |t|
@@ -145,8 +168,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
145
168
  t.text "display_name"
146
169
  t.text "note"
147
170
  t.integer "position"
148
- t.datetime "created_at"
149
- t.datetime "updated_at"
171
+ t.datetime "created_at", :null => false
172
+ t.datetime "updated_at", :null => false
150
173
  end
151
174
 
152
175
  add_index "checkout_types", ["name"], :name => "index_checkout_types_on_name"
@@ -176,8 +199,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
176
199
  t.text "display_name"
177
200
  t.text "note"
178
201
  t.integer "position"
179
- t.datetime "created_at"
180
- t.datetime "updated_at"
202
+ t.datetime "created_at", :null => false
203
+ t.datetime "updated_at", :null => false
181
204
  end
182
205
 
183
206
  create_table "content_types", :force => true do |t|
@@ -185,28 +208,112 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
185
208
  t.text "display_name"
186
209
  t.text "note"
187
210
  t.integer "position"
188
- t.datetime "created_at"
189
- t.datetime "updated_at"
211
+ t.datetime "created_at", :null => false
212
+ t.datetime "updated_at", :null => false
213
+ end
214
+
215
+ create_table "countries", :force => true do |t|
216
+ t.string "name", :null => false
217
+ t.text "display_name"
218
+ t.string "alpha_2"
219
+ t.string "alpha_3"
220
+ t.string "numeric_3"
221
+ t.text "note"
222
+ t.integer "position"
223
+ end
224
+
225
+ add_index "countries", ["alpha_2"], :name => "index_countries_on_alpha_2"
226
+ add_index "countries", ["alpha_3"], :name => "index_countries_on_alpha_3"
227
+ add_index "countries", ["name"], :name => "index_countries_on_name"
228
+ add_index "countries", ["numeric_3"], :name => "index_countries_on_numeric_3"
229
+
230
+ create_table "create_types", :force => true do |t|
231
+ t.string "name"
232
+ t.text "display_name"
233
+ t.text "note"
234
+ t.integer "position"
235
+ t.datetime "created_at", :null => false
236
+ t.datetime "updated_at", :null => false
237
+ end
238
+
239
+ create_table "creates", :force => true do |t|
240
+ t.integer "patron_id", :null => false
241
+ t.integer "work_id", :null => false
242
+ t.integer "position"
243
+ t.datetime "created_at", :null => false
244
+ t.datetime "updated_at", :null => false
245
+ t.integer "create_type_id"
246
+ end
247
+
248
+ add_index "creates", ["patron_id"], :name => "index_creates_on_patron_id"
249
+ add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
250
+
251
+ create_table "donates", :force => true do |t|
252
+ t.integer "patron_id", :null => false
253
+ t.integer "item_id", :null => false
254
+ t.datetime "created_at", :null => false
255
+ t.datetime "updated_at", :null => false
190
256
  end
191
257
 
258
+ add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
259
+ add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
260
+
192
261
  create_table "exemplifies", :force => true do |t|
193
262
  t.integer "manifestation_id", :null => false
194
263
  t.integer "item_id", :null => false
195
- t.string "type"
196
264
  t.integer "position"
197
- t.datetime "created_at"
198
- t.datetime "updated_at"
265
+ t.datetime "created_at", :null => false
266
+ t.datetime "updated_at", :null => false
199
267
  end
200
268
 
201
269
  add_index "exemplifies", ["item_id"], :name => "index_exemplifies_on_item_id", :unique => true
202
270
  add_index "exemplifies", ["manifestation_id"], :name => "index_exemplifies_on_manifestation_id"
203
- add_index "exemplifies", ["type"], :name => "index_exemplifies_on_type"
271
+
272
+ create_table "extents", :force => true do |t|
273
+ t.string "name", :null => false
274
+ t.text "display_name"
275
+ t.text "note"
276
+ t.integer "position"
277
+ t.datetime "created_at", :null => false
278
+ t.datetime "updated_at", :null => false
279
+ end
280
+
281
+ create_table "form_of_works", :force => true do |t|
282
+ t.string "name", :null => false
283
+ t.text "display_name"
284
+ t.text "note"
285
+ t.integer "position"
286
+ t.datetime "created_at", :null => false
287
+ t.datetime "updated_at", :null => false
288
+ end
289
+
290
+ create_table "frequencies", :force => true do |t|
291
+ t.string "name", :null => false
292
+ t.text "display_name"
293
+ t.text "note"
294
+ t.integer "position"
295
+ t.datetime "created_at", :null => false
296
+ t.datetime "updated_at", :null => false
297
+ end
298
+
299
+ create_table "import_requests", :force => true do |t|
300
+ t.string "isbn"
301
+ t.string "state"
302
+ t.integer "manifestation_id"
303
+ t.integer "user_id"
304
+ t.datetime "created_at", :null => false
305
+ t.datetime "updated_at", :null => false
306
+ end
307
+
308
+ add_index "import_requests", ["isbn"], :name => "index_import_requests_on_isbn"
309
+ add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
310
+ add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
204
311
 
205
312
  create_table "item_has_use_restrictions", :force => true do |t|
206
313
  t.integer "item_id", :null => false
207
314
  t.integer "use_restriction_id", :null => false
208
- t.datetime "created_at"
209
- t.datetime "updated_at"
315
+ t.datetime "created_at", :null => false
316
+ t.datetime "updated_at", :null => false
210
317
  end
211
318
 
212
319
  add_index "item_has_use_restrictions", ["item_id"], :name => "index_item_has_use_restrictions_on_item_id"
@@ -215,26 +322,26 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
215
322
  create_table "items", :force => true do |t|
216
323
  t.string "call_number"
217
324
  t.string "item_identifier"
218
- t.integer "circulation_status_id", :default => 5, :null => false
219
- t.integer "checkout_type_id", :default => 1, :null => false
220
- t.datetime "created_at"
221
- t.datetime "updated_at"
325
+ t.integer "circulation_status_id", :default => 5, :null => false
326
+ t.integer "checkout_type_id", :default => 1, :null => false
327
+ t.datetime "created_at", :null => false
328
+ t.datetime "updated_at", :null => false
222
329
  t.datetime "deleted_at"
223
- t.integer "shelf_id", :default => 1, :null => false
224
- t.integer "basket_id"
225
- t.boolean "include_supplements", :default => false, :null => false
226
- t.integer "checkouts_count", :default => 0, :null => false
227
- t.integer "owns_count", :default => 0, :null => false
228
- t.integer "resource_has_subjects_count", :default => 0, :null => false
330
+ t.integer "shelf_id", :default => 1, :null => false
331
+ t.boolean "include_supplements", :default => false, :null => false
229
332
  t.text "note"
230
333
  t.string "url"
231
334
  t.integer "price"
232
- t.integer "lock_version", :default => 0, :null => false
233
- t.integer "required_role_id", :default => 1, :null => false
335
+ t.integer "lock_version", :default => 0, :null => false
336
+ t.integer "required_role_id", :default => 1, :null => false
234
337
  t.string "state"
235
- t.integer "required_score", :default => 0, :null => false
338
+ t.integer "required_score", :default => 0, :null => false
339
+ t.datetime "acquired_at"
340
+ t.integer "bookstore_id"
341
+ t.integer "budget_type_id"
236
342
  end
237
343
 
344
+ add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
238
345
  add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
239
346
  add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
240
347
  add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
@@ -273,8 +380,6 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
273
380
  add_index "lending_policies", ["item_id", "user_group_id"], :name => "index_lending_policies_on_item_id_and_user_group_id", :unique => true
274
381
 
275
382
  create_table "libraries", :force => true do |t|
276
- t.integer "patron_id"
277
- t.string "patron_type"
278
383
  t.string "name", :null => false
279
384
  t.text "display_name"
280
385
  t.string "short_display_name", :null => false
@@ -292,14 +397,14 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
292
397
  t.integer "users_count", :default => 0, :null => false
293
398
  t.integer "position"
294
399
  t.integer "country_id"
295
- t.datetime "created_at"
296
- t.datetime "updated_at"
400
+ t.datetime "created_at", :null => false
401
+ t.datetime "updated_at", :null => false
297
402
  t.datetime "deleted_at"
403
+ t.string "isil"
298
404
  end
299
405
 
300
406
  add_index "libraries", ["library_group_id"], :name => "index_libraries_on_library_group_id"
301
407
  add_index "libraries", ["name"], :name => "index_libraries_on_name", :unique => true
302
- add_index "libraries", ["patron_id"], :name => "index_libraries_on_patron_id", :unique => true
303
408
 
304
409
  create_table "library_groups", :force => true do |t|
305
410
  t.string "name", :null => false
@@ -309,10 +414,9 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
309
414
  t.text "my_networks"
310
415
  t.text "login_banner"
311
416
  t.text "note"
312
- t.boolean "post_to_union_catalog", :default => false, :null => false
313
417
  t.integer "country_id"
314
- t.datetime "created_at"
315
- t.datetime "updated_at"
418
+ t.datetime "created_at", :null => false
419
+ t.datetime "updated_at", :null => false
316
420
  t.text "admin_networks"
317
421
  t.boolean "allow_bookmark_external_url", :default => false, :null => false
318
422
  t.integer "position"
@@ -321,6 +425,15 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
321
425
 
322
426
  add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
323
427
 
428
+ create_table "licenses", :force => true do |t|
429
+ t.string "name", :null => false
430
+ t.string "display_name"
431
+ t.text "note"
432
+ t.integer "position"
433
+ t.datetime "created_at", :null => false
434
+ t.datetime "updated_at", :null => false
435
+ end
436
+
324
437
  create_table "manifestation_checkout_stats", :force => true do |t|
325
438
  t.datetime "start_date"
326
439
  t.datetime "end_date"
@@ -334,6 +447,27 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
334
447
 
335
448
  add_index "manifestation_checkout_stats", ["state"], :name => "index_manifestation_checkout_stats_on_state"
336
449
 
450
+ create_table "manifestation_relationship_types", :force => true do |t|
451
+ t.string "name", :null => false
452
+ t.text "display_name"
453
+ t.text "note"
454
+ t.integer "position"
455
+ t.datetime "created_at", :null => false
456
+ t.datetime "updated_at", :null => false
457
+ end
458
+
459
+ create_table "manifestation_relationships", :force => true do |t|
460
+ t.integer "parent_id"
461
+ t.integer "child_id"
462
+ t.integer "manifestation_relationship_type_id"
463
+ t.datetime "created_at", :null => false
464
+ t.datetime "updated_at", :null => false
465
+ t.integer "position"
466
+ end
467
+
468
+ add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
469
+ add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
470
+
337
471
  create_table "manifestation_reserve_stats", :force => true do |t|
338
472
  t.datetime "start_date"
339
473
  t.datetime "end_date"
@@ -348,25 +482,25 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
348
482
  add_index "manifestation_reserve_stats", ["state"], :name => "index_manifestation_reserve_stats_on_state"
349
483
 
350
484
  create_table "manifestations", :force => true do |t|
351
- t.text "original_title", :null => false
485
+ t.text "original_title", :null => false
352
486
  t.text "title_alternative"
353
487
  t.text "title_transcription"
354
488
  t.string "classification_number"
355
489
  t.string "manifestation_identifier"
356
490
  t.datetime "date_of_publication"
357
- t.datetime "copyright_date"
358
- t.datetime "created_at"
359
- t.datetime "updated_at"
491
+ t.datetime "date_copyrighted"
492
+ t.datetime "created_at", :null => false
493
+ t.datetime "updated_at", :null => false
360
494
  t.datetime "deleted_at"
361
495
  t.string "access_address"
362
- t.integer "language_id", :default => 1, :null => false
363
- t.integer "carrier_type_id", :default => 1, :null => false
364
- t.integer "extent_id", :default => 1, :null => false
496
+ t.integer "language_id", :default => 1, :null => false
497
+ t.integer "carrier_type_id", :default => 1, :null => false
498
+ t.integer "extent_id", :default => 1, :null => false
365
499
  t.integer "start_page"
366
500
  t.integer "end_page"
367
- t.decimal "height"
368
- t.decimal "width"
369
- t.decimal "depth"
501
+ t.integer "height"
502
+ t.integer "width"
503
+ t.integer "depth"
370
504
  t.string "isbn"
371
505
  t.string "isbn10"
372
506
  t.string "wrong_isbn"
@@ -381,22 +515,35 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
381
515
  t.string "serial_number_string"
382
516
  t.integer "edition"
383
517
  t.text "note"
384
- t.integer "produces_count", :default => 0, :null => false
385
- t.integer "exemplifies_count", :default => 0, :null => false
386
- t.integer "embodies_count", :default => 0, :null => false
387
- t.integer "work_has_subjects_count", :default => 0, :null => false
388
- t.boolean "repository_content", :default => false, :null => false
389
- t.integer "lock_version", :default => 0, :null => false
390
- t.integer "required_role_id", :default => 1, :null => false
518
+ t.boolean "repository_content", :default => false, :null => false
519
+ t.integer "lock_version", :default => 0, :null => false
520
+ t.integer "required_role_id", :default => 1, :null => false
391
521
  t.string "state"
392
- t.integer "required_score", :default => 0, :null => false
393
- t.integer "frequency_id", :default => 1, :null => false
394
- t.boolean "subscription_master", :default => false, :null => false
522
+ t.integer "required_score", :default => 0, :null => false
523
+ t.integer "frequency_id", :default => 1, :null => false
524
+ t.boolean "subscription_master", :default => false, :null => false
525
+ t.string "attachment_file_name"
526
+ t.string "attachment_content_type"
527
+ t.integer "attachment_file_size"
528
+ t.datetime "attachment_updated_at"
529
+ t.text "title_alternative_transcription"
530
+ t.text "description"
531
+ t.text "abstract"
532
+ t.datetime "available_at"
533
+ t.datetime "valid_until"
534
+ t.datetime "date_submitted"
535
+ t.datetime "date_accepted"
536
+ t.datetime "date_caputured"
395
537
  t.string "pub_date"
538
+ t.string "edition_string"
396
539
  t.integer "volume_number"
397
540
  t.integer "issue_number"
398
541
  t.integer "serial_number"
399
- t.string "edition_string"
542
+ t.string "ndc"
543
+ t.integer "content_type_id", :default => 1
544
+ t.integer "year_of_publication"
545
+ t.text "attachment_meta"
546
+ t.integer "month_of_publication"
400
547
  end
401
548
 
402
549
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
@@ -411,13 +558,86 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
411
558
  add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
412
559
  add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
413
560
 
561
+ create_table "medium_of_performances", :force => true do |t|
562
+ t.string "name", :null => false
563
+ t.text "display_name"
564
+ t.text "note"
565
+ t.integer "position"
566
+ t.datetime "created_at", :null => false
567
+ t.datetime "updated_at", :null => false
568
+ end
569
+
570
+ create_table "owns", :force => true do |t|
571
+ t.integer "patron_id", :null => false
572
+ t.integer "item_id", :null => false
573
+ t.integer "position"
574
+ t.datetime "created_at", :null => false
575
+ t.datetime "updated_at", :null => false
576
+ end
577
+
578
+ add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
579
+ add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
580
+
581
+ create_table "patron_import_files", :force => true do |t|
582
+ t.integer "parent_id"
583
+ t.string "content_type"
584
+ t.integer "size"
585
+ t.integer "user_id"
586
+ t.text "note"
587
+ t.datetime "executed_at"
588
+ t.string "state"
589
+ t.string "patron_import_file_name"
590
+ t.string "patron_import_content_type"
591
+ t.integer "patron_import_file_size"
592
+ t.datetime "patron_import_updated_at"
593
+ t.datetime "created_at", :null => false
594
+ t.datetime "updated_at", :null => false
595
+ t.string "patron_import_fingerprint"
596
+ t.text "error_message"
597
+ t.string "edit_mode"
598
+ end
599
+
600
+ add_index "patron_import_files", ["parent_id"], :name => "index_patron_import_files_on_parent_id"
601
+ add_index "patron_import_files", ["state"], :name => "index_patron_import_files_on_state"
602
+ add_index "patron_import_files", ["user_id"], :name => "index_patron_import_files_on_user_id"
603
+
604
+ create_table "patron_import_results", :force => true do |t|
605
+ t.integer "patron_import_file_id"
606
+ t.integer "patron_id"
607
+ t.integer "user_id"
608
+ t.text "body"
609
+ t.datetime "created_at", :null => false
610
+ t.datetime "updated_at", :null => false
611
+ end
612
+
613
+ create_table "patron_relationship_types", :force => true do |t|
614
+ t.string "name", :null => false
615
+ t.text "display_name"
616
+ t.text "note"
617
+ t.integer "position"
618
+ t.datetime "created_at", :null => false
619
+ t.datetime "updated_at", :null => false
620
+ end
621
+
622
+ create_table "patron_relationships", :force => true do |t|
623
+ t.integer "parent_id"
624
+ t.integer "child_id"
625
+ t.integer "patron_relationship_type_id"
626
+ t.datetime "created_at", :null => false
627
+ t.datetime "updated_at", :null => false
628
+ t.integer "position"
629
+ end
630
+
631
+ add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
632
+ add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
633
+
414
634
  create_table "patron_types", :force => true do |t|
415
635
  t.string "name", :null => false
416
636
  t.text "display_name"
417
637
  t.text "note"
418
638
  t.integer "position"
419
- t.datetime "created_at"
420
- t.datetime "updated_at"
639
+ t.datetime "created_at", :null => false
640
+ t.datetime "updated_at", :null => false
421
641
  end
422
642
 
423
643
  create_table "patrons", :force => true do |t|
@@ -433,8 +653,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
433
653
  t.string "full_name"
434
654
  t.text "full_name_transcription"
435
655
  t.text "full_name_alternative"
436
- t.datetime "created_at"
437
- t.datetime "updated_at"
656
+ t.datetime "created_at", :null => false
657
+ t.datetime "updated_at", :null => false
438
658
  t.datetime "deleted_at"
439
659
  t.string "zip_code_1"
440
660
  t.string "zip_code_2"
@@ -454,20 +674,19 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
454
674
  t.text "region"
455
675
  t.datetime "date_of_birth"
456
676
  t.datetime "date_of_death"
457
- t.integer "language_id", :default => 1, :null => false
458
- t.integer "country_id", :default => 1, :null => false
459
- t.integer "patron_type_id", :default => 1, :null => false
460
- t.integer "lock_version", :default => 0, :null => false
461
- t.text "note"
462
- t.integer "creates_count", :default => 0, :null => false
463
- t.integer "realizes_count", :default => 0, :null => false
464
- t.integer "produces_count", :default => 0, :null => false
465
- t.integer "owns_count", :default => 0, :null => false
466
- t.integer "required_role_id", :default => 1, :null => false
467
- t.integer "required_score", :default => 0, :null => false
677
+ t.integer "language_id", :default => 1, :null => false
678
+ t.integer "country_id", :default => 1, :null => false
679
+ t.integer "patron_type_id", :default => 1, :null => false
680
+ t.integer "lock_version", :default => 0, :null => false
681
+ t.text "note"
682
+ t.integer "required_role_id", :default => 1, :null => false
683
+ t.integer "required_score", :default => 0, :null => false
468
684
  t.string "state"
469
685
  t.text "email"
470
686
  t.text "url"
687
+ t.text "full_name_alternative_transcription"
688
+ t.string "birth_date"
689
+ t.string "death_date"
471
690
  end
472
691
 
473
692
  add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
@@ -476,6 +695,85 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
476
695
  add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
477
696
  add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
478
697
 
698
+ create_table "picture_files", :force => true do |t|
699
+ t.integer "picture_attachable_id"
700
+ t.string "picture_attachable_type"
701
+ t.string "content_type"
702
+ t.text "title"
703
+ t.string "thumbnail"
704
+ t.integer "position"
705
+ t.datetime "created_at", :null => false
706
+ t.datetime "updated_at", :null => false
707
+ t.string "picture_file_name"
708
+ t.string "picture_content_type"
709
+ t.integer "picture_file_size"
710
+ t.datetime "picture_updated_at"
711
+ t.text "picture_meta"
712
+ t.string "picture_fingerprint"
713
+ end
714
+
715
+ add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :name => "index_picture_files_on_picture_attachable_id_and_type"
716
+
717
+ create_table "produce_types", :force => true do |t|
718
+ t.string "name"
719
+ t.text "display_name"
720
+ t.text "note"
721
+ t.integer "position"
722
+ t.datetime "created_at", :null => false
723
+ t.datetime "updated_at", :null => false
724
+ end
725
+
726
+ create_table "produces", :force => true do |t|
727
+ t.integer "patron_id", :null => false
728
+ t.integer "manifestation_id", :null => false
729
+ t.integer "position"
730
+ t.datetime "created_at", :null => false
731
+ t.datetime "updated_at", :null => false
732
+ t.integer "produce_type_id"
733
+ end
734
+
735
+ add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
736
+ add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
737
+
738
+ create_table "realize_types", :force => true do |t|
739
+ t.string "name"
740
+ t.text "display_name"
741
+ t.text "note"
742
+ t.integer "position"
743
+ t.datetime "created_at", :null => false
744
+ t.datetime "updated_at", :null => false
745
+ end
746
+
747
+ create_table "realizes", :force => true do |t|
748
+ t.integer "patron_id", :null => false
749
+ t.integer "expression_id", :null => false
750
+ t.integer "position"
751
+ t.datetime "created_at", :null => false
752
+ t.datetime "updated_at", :null => false
753
+ t.integer "realize_type_id"
754
+ end
755
+
756
+ add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
757
+ add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
758
+
759
+ create_table "request_status_types", :force => true do |t|
760
+ t.string "name", :null => false
761
+ t.text "display_name"
762
+ t.text "note"
763
+ t.integer "position"
764
+ t.datetime "created_at", :null => false
765
+ t.datetime "updated_at", :null => false
766
+ end
767
+
768
+ create_table "request_types", :force => true do |t|
769
+ t.string "name", :null => false
770
+ t.text "display_name"
771
+ t.text "note"
772
+ t.integer "position"
773
+ t.datetime "created_at", :null => false
774
+ t.datetime "updated_at", :null => false
775
+ end
776
+
479
777
  create_table "reserve_stat_has_manifestations", :force => true do |t|
480
778
  t.integer "manifestation_reserve_stat_id", :null => false
481
779
  t.integer "manifestation_id", :null => false
@@ -519,60 +817,154 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
519
817
  add_index "reserves", ["request_status_type_id"], :name => "index_reserves_on_request_status_type_id"
520
818
  add_index "reserves", ["user_id"], :name => "index_reserves_on_user_id"
521
819
 
820
+ create_table "resource_import_files", :force => true do |t|
821
+ t.integer "parent_id"
822
+ t.string "content_type"
823
+ t.integer "size"
824
+ t.integer "user_id"
825
+ t.text "note"
826
+ t.datetime "executed_at"
827
+ t.string "state"
828
+ t.string "resource_import_file_name"
829
+ t.string "resource_import_content_type"
830
+ t.integer "resource_import_file_size"
831
+ t.datetime "resource_import_updated_at"
832
+ t.datetime "created_at", :null => false
833
+ t.datetime "updated_at", :null => false
834
+ t.string "edit_mode"
835
+ t.string "resource_import_fingerprint"
836
+ t.text "error_message"
837
+ end
838
+
839
+ add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
840
+ add_index "resource_import_files", ["state"], :name => "index_resource_import_files_on_state"
841
+ add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
842
+
843
+ create_table "resource_import_results", :force => true do |t|
844
+ t.integer "resource_import_file_id"
845
+ t.integer "manifestation_id"
846
+ t.integer "item_id"
847
+ t.text "body"
848
+ t.datetime "created_at", :null => false
849
+ t.datetime "updated_at", :null => false
850
+ end
851
+
852
+ add_index "resource_import_results", ["item_id"], :name => "index_resource_import_results_on_item_id"
853
+ add_index "resource_import_results", ["manifestation_id"], :name => "index_resource_import_results_on_manifestation_id"
854
+ add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
855
+
522
856
  create_table "roles", :force => true do |t|
523
857
  t.string "name"
524
858
  t.text "display_name"
525
859
  t.text "note"
526
860
  t.integer "position"
527
- t.datetime "created_at"
528
- t.datetime "updated_at"
861
+ t.datetime "created_at", :null => false
862
+ t.datetime "updated_at", :null => false
863
+ end
864
+
865
+ create_table "search_engines", :force => true do |t|
866
+ t.string "name", :null => false
867
+ t.text "display_name"
868
+ t.string "url", :null => false
869
+ t.text "base_url", :null => false
870
+ t.text "http_method", :null => false
871
+ t.text "query_param", :null => false
872
+ t.text "additional_param"
873
+ t.text "note"
874
+ t.integer "position"
875
+ t.datetime "created_at", :null => false
876
+ t.datetime "updated_at", :null => false
529
877
  end
530
878
 
531
879
  create_table "series_has_manifestations", :force => true do |t|
532
880
  t.integer "series_statement_id"
533
881
  t.integer "manifestation_id"
534
882
  t.integer "position"
535
- t.datetime "created_at"
536
- t.datetime "updated_at"
883
+ t.datetime "created_at", :null => false
884
+ t.datetime "updated_at", :null => false
537
885
  end
538
886
 
539
887
  add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
540
888
  add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
541
889
 
890
+ create_table "series_statement_merge_lists", :force => true do |t|
891
+ t.string "title"
892
+ t.datetime "created_at", :null => false
893
+ t.datetime "updated_at", :null => false
894
+ end
895
+
896
+ create_table "series_statement_merges", :force => true do |t|
897
+ t.integer "series_statement_id", :null => false
898
+ t.integer "series_statement_merge_list_id", :null => false
899
+ t.datetime "created_at", :null => false
900
+ t.datetime "updated_at", :null => false
901
+ end
902
+
903
+ add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
904
+ add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
905
+
542
906
  create_table "series_statements", :force => true do |t|
543
907
  t.text "original_title"
544
908
  t.text "numbering"
545
909
  t.text "title_subseries"
546
910
  t.text "numbering_subseries"
547
911
  t.integer "position"
912
+ t.datetime "created_at", :null => false
913
+ t.datetime "updated_at", :null => false
548
914
  t.text "title_transcription"
549
915
  t.text "title_alternative"
550
- t.datetime "created_at"
551
- t.datetime "updated_at"
552
916
  t.string "series_statement_identifier"
553
917
  t.string "issn"
554
918
  t.boolean "periodical"
555
919
  t.integer "root_manifestation_id"
556
920
  t.text "note"
921
+ t.text "title_subseries_transcription"
557
922
  end
558
923
 
559
924
  add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
560
925
  add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
561
926
 
562
927
  create_table "shelves", :force => true do |t|
563
- t.string "name", :null => false
928
+ t.string "name", :null => false
564
929
  t.text "display_name"
565
930
  t.text "note"
566
- t.integer "library_id", :default => 1, :null => false
567
- t.integer "items_count", :default => 0, :null => false
931
+ t.integer "library_id", :default => 1, :null => false
932
+ t.integer "items_count", :default => 0, :null => false
568
933
  t.integer "position"
569
- t.datetime "created_at"
570
- t.datetime "updated_at"
934
+ t.datetime "created_at", :null => false
935
+ t.datetime "updated_at", :null => false
571
936
  t.datetime "deleted_at"
937
+ t.boolean "closed", :default => false, :null => false
572
938
  end
573
939
 
574
940
  add_index "shelves", ["library_id"], :name => "index_shelves_on_library_id"
575
941
 
942
+ create_table "subscribes", :force => true do |t|
943
+ t.integer "subscription_id", :null => false
944
+ t.integer "work_id", :null => false
945
+ t.datetime "start_at", :null => false
946
+ t.datetime "end_at", :null => false
947
+ t.datetime "created_at", :null => false
948
+ t.datetime "updated_at", :null => false
949
+ end
950
+
951
+ add_index "subscribes", ["subscription_id"], :name => "index_subscribes_on_subscription_id"
952
+ add_index "subscribes", ["work_id"], :name => "index_subscribes_on_work_id"
953
+
954
+ create_table "subscriptions", :force => true do |t|
955
+ t.text "title", :null => false
956
+ t.text "note"
957
+ t.integer "user_id"
958
+ t.integer "order_list_id"
959
+ t.datetime "deleted_at"
960
+ t.integer "subscribes_count", :default => 0, :null => false
961
+ t.datetime "created_at", :null => false
962
+ t.datetime "updated_at", :null => false
963
+ end
964
+
965
+ add_index "subscriptions", ["order_list_id"], :name => "index_subscriptions_on_order_list_id"
966
+ add_index "subscriptions", ["user_id"], :name => "index_subscriptions_on_user_id"
967
+
576
968
  create_table "taggings", :force => true do |t|
577
969
  t.integer "tag_id"
578
970
  t.integer "taggable_id"
@@ -589,8 +981,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
589
981
  create_table "tags", :force => true do |t|
590
982
  t.string "name"
591
983
  t.string "name_transcription"
592
- t.datetime "created_at"
593
- t.datetime "updated_at"
984
+ t.datetime "created_at", :null => false
985
+ t.datetime "updated_at", :null => false
594
986
  end
595
987
 
596
988
  create_table "use_restrictions", :force => true do |t|
@@ -598,8 +990,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
598
990
  t.text "display_name"
599
991
  t.text "note"
600
992
  t.integer "position"
601
- t.datetime "created_at"
602
- t.datetime "updated_at"
993
+ t.datetime "created_at", :null => false
994
+ t.datetime "updated_at", :null => false
603
995
  end
604
996
 
605
997
  create_table "user_checkout_stats", :force => true do |t|
@@ -640,8 +1032,9 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
640
1032
  t.text "display_name"
641
1033
  t.text "note"
642
1034
  t.integer "position"
643
- t.datetime "created_at"
644
- t.datetime "updated_at"
1035
+ t.datetime "created_at", :null => false
1036
+ t.datetime "updated_at", :null => false
1037
+ t.datetime "deleted_at"
645
1038
  t.integer "valid_period_for_new_user", :default => 0, :null => false
646
1039
  t.datetime "expired_at"
647
1040
  t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
@@ -652,8 +1045,8 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
652
1045
  create_table "user_has_roles", :force => true do |t|
653
1046
  t.integer "user_id"
654
1047
  t.integer "role_id"
655
- t.datetime "created_at"
656
- t.datetime "updated_at"
1048
+ t.datetime "created_at", :null => false
1049
+ t.datetime "updated_at", :null => false
657
1050
  end
658
1051
 
659
1052
  create_table "user_reserve_stats", :force => true do |t|
@@ -675,25 +1068,46 @@ ActiveRecord::Schema.define(:version => 20120424103932) do
675
1068
  t.string "username"
676
1069
  t.text "note"
677
1070
  t.string "locale"
678
- t.datetime "created_at"
679
- t.datetime "updated_at"
680
- t.string "email", :default => "", :null => false
681
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
1071
+ t.datetime "created_at", :null => false
1072
+ t.datetime "updated_at", :null => false
1073
+ t.string "email", :default => "", :null => false
1074
+ t.string "encrypted_password", :default => "", :null => false
682
1075
  t.string "reset_password_token"
683
1076
  t.datetime "reset_password_sent_at"
684
1077
  t.datetime "remember_created_at"
685
- t.integer "sign_in_count", :default => 0
1078
+ t.integer "sign_in_count", :default => 0
686
1079
  t.datetime "current_sign_in_at"
687
1080
  t.datetime "last_sign_in_at"
688
1081
  t.string "current_sign_in_ip"
689
1082
  t.string "last_sign_in_ip"
690
- t.boolean "share_bookmarks"
691
- t.boolean "save_checkout_history", :default => false, :null => false
1083
+ t.string "password_salt"
1084
+ t.string "confirmation_token"
1085
+ t.datetime "confirmed_at"
1086
+ t.datetime "confirmation_sent_at"
1087
+ t.string "unconfirmed_email"
1088
+ t.integer "failed_attempts", :default => 0
1089
+ t.string "unlock_token"
1090
+ t.datetime "locked_at"
1091
+ t.string "authentication_token"
1092
+ t.datetime "deleted_at"
1093
+ t.boolean "save_checkout_history", :default => false, :null => false
692
1094
  t.string "checkout_icalendar_token"
1095
+ t.boolean "share_bookmarks"
693
1096
  end
694
1097
 
695
1098
  add_index "users", ["checkout_icalendar_token"], :name => "index_users_on_checkout_icalendar_token", :unique => true
696
1099
  add_index "users", ["email"], :name => "index_users_on_email"
697
1100
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
698
1101
 
1102
+ create_table "versions", :force => true do |t|
1103
+ t.string "item_type", :null => false
1104
+ t.integer "item_id", :null => false
1105
+ t.string "event", :null => false
1106
+ t.string "whodunnit"
1107
+ t.text "object"
1108
+ t.datetime "created_at"
1109
+ end
1110
+
1111
+ add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
1112
+
699
1113
  end