enju_event 0.1.17.pre17 → 0.1.17.pre18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/event_import_files_controller.rb +7 -2
  3. data/app/controllers/event_import_results_controller.rb +1 -1
  4. data/app/models/event.rb +11 -13
  5. data/app/models/event_import_file.rb +52 -73
  6. data/app/models/event_import_file_state_machine.rb +19 -0
  7. data/app/models/event_import_file_transition.rb +20 -0
  8. data/app/views/calendar/index.html.erb +2 -2
  9. data/app/views/event_categories/edit.html.erb +2 -2
  10. data/app/views/event_categories/index.html.erb +2 -2
  11. data/app/views/event_categories/new.html.erb +2 -2
  12. data/app/views/event_categories/show.html.erb +2 -2
  13. data/app/views/event_import_files/edit.html.erb +2 -2
  14. data/app/views/event_import_files/index.html.erb +4 -4
  15. data/app/views/event_import_files/new.html.erb +17 -4
  16. data/app/views/event_import_files/show.html.erb +13 -3
  17. data/app/views/event_import_results/index.html.erb +6 -6
  18. data/app/views/event_import_results/{index.csv.erb → index.tsv.erb} +0 -0
  19. data/app/views/event_import_results/show.html.erb +2 -2
  20. data/app/views/events/edit.html.erb +2 -2
  21. data/app/views/events/index.html.erb +2 -2
  22. data/app/views/events/new.html.erb +2 -2
  23. data/app/views/events/show.html.erb +8 -3
  24. data/app/views/participates/edit.html.erb +2 -2
  25. data/app/views/participates/index.html.erb +2 -2
  26. data/app/views/participates/new.html.erb +2 -2
  27. data/app/views/participates/show.html.erb +2 -2
  28. data/app/workers/event_import_file_queue.rb +7 -0
  29. data/config/locales/translation_en.yml +1 -0
  30. data/config/locales/translation_ja.yml +1 -0
  31. data/db/migrate/20081028093607_create_event_import_files.rb +0 -2
  32. data/db/migrate/20140523171309_create_event_import_file_transitions.rb +14 -0
  33. data/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +5 -0
  34. data/lib/enju_event/engine.rb +1 -1
  35. data/lib/enju_event/version.rb +1 -1
  36. data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -12
  37. data/spec/dummy/db/migrate/006_create_items.rb +2 -2
  38. data/spec/dummy/db/migrate/029_create_subjects.rb +27 -0
  39. data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
  40. data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
  41. data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
  42. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -7
  43. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -5
  44. data/spec/dummy/db/migrate/{20111201163342_create_user_groups.rb → 077_create_user_groups.rb} +2 -2
  45. data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -9
  46. data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
  47. data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
  48. data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
  49. data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
  50. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
  51. data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
  52. data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
  53. data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +16 -0
  54. data/spec/dummy/db/migrate/142_create_classifications.rb +19 -0
  55. data/spec/dummy/db/migrate/143_create_subject_has_classifications.rb +16 -0
  56. data/spec/dummy/db/migrate/144_create_classification_types.rb +16 -0
  57. data/spec/dummy/db/migrate/145_create_subject_heading_types.rb +16 -0
  58. data/spec/dummy/db/migrate/146_create_subject_types.rb +16 -0
  59. data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
  60. data/spec/dummy/db/migrate/154_create_messages.rb +24 -0
  61. data/spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb +18 -0
  62. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +20 -0
  63. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  64. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
  65. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
  66. data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +17 -0
  67. data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
  68. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
  69. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
  70. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +16 -0
  71. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +16 -0
  72. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
  73. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
  74. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +16 -0
  75. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +16 -0
  76. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
  77. data/spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb +16 -0
  78. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +27 -0
  79. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
  80. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  81. data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
  82. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
  83. data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
  84. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  85. data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
  86. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
  87. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
  88. data/spec/dummy/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
  89. data/spec/dummy/db/migrate/20111201155456_devise_create_users.rb +42 -0
  90. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
  91. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
  92. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
  93. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
  94. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
  95. data/spec/dummy/db/migrate/20120406020752_add_url_to_subject.rb +5 -0
  96. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
  97. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  98. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  99. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
  100. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
  101. data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
  102. data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
  103. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  104. data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +8 -0
  105. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  106. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  107. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  108. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  109. data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +6 -0
  110. data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +6 -0
  111. data/spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +5 -0
  112. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
  113. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
  114. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
  115. data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
  116. data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
  117. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  118. data/spec/dummy/db/schema.rb +613 -92
  119. data/spec/dummy/db/test.sqlite3 +0 -0
  120. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv +7 -7
  121. data/spec/dummy/solr/default/data/index/_b2.fdt +0 -0
  122. data/spec/dummy/solr/default/data/index/{_14y.fdx → _b2.fdx} +0 -0
  123. data/spec/dummy/solr/default/data/index/{_14y.fnm → _b2.fnm} +0 -0
  124. data/spec/dummy/solr/default/data/index/{_14y.nvd → _b2.nvd} +0 -0
  125. data/spec/dummy/solr/default/data/index/{_14y.nvm → _b2.nvm} +0 -0
  126. data/spec/dummy/solr/default/data/index/{_14y.si → _b2.si} +0 -0
  127. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.doc → _b2_Lucene41_0.doc} +0 -0
  128. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.pos → _b2_Lucene41_0.pos} +0 -0
  129. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.tim → _b2_Lucene41_0.tim} +0 -0
  130. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.tip → _b2_Lucene41_0.tip} +0 -0
  131. data/spec/dummy/solr/default/data/index/_b3.fdt +0 -0
  132. data/spec/dummy/solr/default/data/index/{_14z.fdx → _b3.fdx} +0 -0
  133. data/spec/dummy/solr/default/data/index/{_14z.fnm → _b3.fnm} +0 -0
  134. data/spec/dummy/solr/default/data/index/{_14z.nvd → _b3.nvd} +0 -0
  135. data/spec/dummy/solr/default/data/index/{_14z.nvm → _b3.nvm} +0 -0
  136. data/spec/dummy/solr/default/data/index/{_14z.si → _b3.si} +0 -0
  137. data/spec/dummy/solr/default/data/index/{_14z_Lucene41_0.doc → _b3_Lucene41_0.doc} +0 -0
  138. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.pos +0 -0
  139. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.tim +0 -0
  140. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.tip +0 -0
  141. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  142. data/spec/dummy/solr/default/data/index/segments_ht +0 -0
  143. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000630 +0 -0
  144. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000631 +0 -0
  145. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002010 → tlog.0000000000000000632} +0 -0
  146. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000633 +0 -0
  147. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000634 +0 -0
  148. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002013 → tlog.0000000000000000635} +0 -0
  149. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000636 +0 -0
  150. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000637 +0 -0
  151. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002016 → tlog.0000000000000000638} +0 -0
  152. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000639 +0 -0
  153. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  154. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  155. data/spec/fixtures/event_import_files.yml +1 -4
  156. data/spec/fixtures/libraries.yml +0 -5
  157. data/spec/models/event_import_file_spec.rb +14 -6
  158. data/spec/models/event_spec.rb +1 -1
  159. data/spec/spec_helper.rb +3 -0
  160. data/spec/support/resque.rb +32 -0
  161. metadata +271 -140
  162. data/spec/dummy/db/development.sqlite3 +0 -0
  163. data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +0 -9
  164. data/spec/dummy/db/migrate/20100527113752_create_delayed_jobs.rb +0 -21
  165. data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +0 -9
  166. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +0 -9
  167. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +0 -12
  168. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
  169. data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -14
  170. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +0 -52
  171. data/spec/dummy/solr/default/data/index/_14y.fdt +0 -0
  172. data/spec/dummy/solr/default/data/index/_14z.fdt +0 -0
  173. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.pos +0 -0
  174. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.tim +0 -0
  175. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.tip +0 -0
  176. data/spec/dummy/solr/default/data/index/segments_1k3 +0 -0
  177. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002008 +0 -0
  178. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002009 +0 -0
  179. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002011 +0 -0
  180. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002012 +0 -0
  181. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002014 +0 -0
  182. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002015 +0 -0
  183. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002017 +0 -0
  184. data/spec/dummy/solr/test/data/index/_a.fdt +0 -0
  185. data/spec/dummy/solr/test/data/index/_a.fdx +0 -0
  186. data/spec/dummy/solr/test/data/index/_a.fnm +0 -0
  187. data/spec/dummy/solr/test/data/index/_a.nvd +0 -0
  188. data/spec/dummy/solr/test/data/index/_a.nvm +0 -0
  189. data/spec/dummy/solr/test/data/index/_a.si +0 -0
  190. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.doc +0 -0
  191. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.pos +0 -0
  192. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tim +0 -0
  193. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tip +0 -0
  194. data/spec/dummy/solr/test/data/index/segments_n +0 -0
  195. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000013 +0 -0
  196. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000014 +0 -0
  197. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000015 +0 -0
  198. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000016 +0 -0
  199. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000017 +0 -0
  200. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000018 +0 -0
  201. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000019 +0 -0
  202. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000020 +0 -0
  203. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000021 +0 -0
@@ -0,0 +1,11 @@
1
+ class AddLftAndRgtToClassification < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :classifications, :lft, :integer
4
+ add_column :classifications, :rgt, :integer
5
+ end
6
+
7
+ def self.down
8
+ remove_column :classifications, :rgt
9
+ remove_column :classifications, :lft
10
+ end
11
+ end
@@ -0,0 +1,42 @@
1
+ class DeviseCreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(:users) do |t|
4
+ ## Database authenticatable
5
+ t.string :email, :null => false, :default => ""
6
+ t.string :encrypted_password, :null => false, :default => ""
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
+
15
+ ## Trackable
16
+ t.integer :sign_in_count, :default => 0, :null => false
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Confirmable
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
25
+ # t.datetime :confirmation_sent_at
26
+ # t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
32
+
33
+
34
+ t.timestamps
35
+ end
36
+
37
+ add_index :users, :email, :unique => true
38
+ add_index :users, :reset_password_token, :unique => true
39
+ # add_index :users, :confirmation_token, :unique => true
40
+ # add_index :users, :unlock_token, :unique => true
41
+ end
42
+ end
@@ -0,0 +1,5 @@
1
+ class AddSaveCheckoutHistoryToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :save_checkout_history, :boolean, :default => false, :null => false
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddCheckoutIcalendarTokenToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :checkout_icalendar_token, :string
4
+ add_index :users, :checkout_icalendar_token, :unique => true
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddDepthToMessage < ActiveRecord::Migration
2
+ def change
3
+ add_column :messages, :depth, :integer
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,14 @@
1
+ class CreateAccepts < ActiveRecord::Migration
2
+ def change
3
+ create_table :accepts do |t|
4
+ t.integer :basket_id
5
+ t.integer :item_id
6
+ t.integer :librarian_id
7
+
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :accepts, :basket_id
12
+ add_index :accepts, :item_id
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class AddUrlToSubject < ActiveRecord::Migration
2
+ def change
3
+ add_column :subjects, :url, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddLibrarianIdToCheckedItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :checked_items, :librarian_id, :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,6 @@
1
+ class AddDoiToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :doi, :string
4
+ add_index :manifestations, :doi
5
+ end
6
+ end
@@ -0,0 +1,26 @@
1
+ class AddAdditionalAttributesToUser < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :username, :string
4
+ add_column :users, :user_number, :string
5
+ add_column :users, :state, :string
6
+ add_column :users, :locale, :string
7
+ add_column :users, :deleted_at, :datetime
8
+ add_column :users, :expired_at, :datetime
9
+ add_column :users, :library_id, :integer, :default => 1, :null => false
10
+ add_column :users, :required_role_id, :integer, :default => 1, :null => false
11
+ add_column :users, :user_group_id, :integer, :default => 1, :null => false
12
+ add_column :users, :note, :text
13
+ add_column :users, :keyword_list, :text
14
+
15
+ add_column :users, :failed_attempts, :integer, :default => 0
16
+ add_column :users, :unlock_token, :string
17
+ add_column :users, :locked_at, :datetime
18
+
19
+ add_column :users, :confirmed_at, :datetime
20
+
21
+ add_index :users, :username, :unique => true
22
+ add_index :users, :user_group_id
23
+ add_index :users, :user_number, :unique => true
24
+ add_index :users, :unlock_token, :unique => true
25
+ end
26
+ end
@@ -0,0 +1,5 @@
1
+ class AddStateIndexToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_index :reserves, :state
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddRetainedAtToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_column :reserves, :retained_at, :datetime
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddPostponedAtToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_column :reserves, :postponed_at, :datetime
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddLatitudeAndLongitudeToLibrary < ActiveRecord::Migration
2
+ def change
3
+ add_column :libraries, :latitude, :float
4
+ add_column :libraries, :longitude, :float
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ class AddCirculationStatusIdToItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :items, :circulation_status_id, :integer, :default => 5, :null => false
4
+ add_column :items, :checkout_type_id, :integer, :default => 1, :null => false
5
+ add_index :items, :circulation_status_id
6
+ add_index :items, :checkout_type_id
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ class AddPeriodicalToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :periodical, :boolean
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ class AddCreatorStringToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :creator_string, :text
4
+ add_column :series_statements, :volume_number_string, :text
5
+ add_column :series_statements, :volume_number_transcription_string, :text
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ class AddSeriesMasterToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :series_master, :boolean
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddRootManifestationIdToSeriesStatement < ActiveRecord::Migration
2
+ def change
3
+ add_column :series_statements, :root_manifestation_id, :integer
4
+ add_index :series_statements, :root_manifestation_id
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddManifestationIdToSubject < ActiveRecord::Migration
2
+ def change
3
+ add_column :subjects, :manifestation_id, :integer
4
+ add_index :subjects, :manifestation_id
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddManifestationIdToClassification < ActiveRecord::Migration
2
+ def change
3
+ add_column :classifications, :manifestation_id, :integer
4
+ add_index :classifications, :manifestation_id
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddSubjectHeadingTypeIdToSubject < ActiveRecord::Migration
2
+ def change
3
+ add_column :subjects, :subject_heading_type_id, :integer
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ class CreateIdentifierTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :identifier_types do |t|
4
+ t.string :name
5
+ t.text :display_name
6
+ t.text :note
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ class CreateIdentifiers < ActiveRecord::Migration
2
+ def change
3
+ create_table :identifiers do |t|
4
+ t.string :body, :null => false
5
+ t.integer :identifier_type_id, :null => false
6
+ t.integer :manifestation_id
7
+ t.boolean :primary
8
+ t.integer :position
9
+
10
+ t.timestamps
11
+ end
12
+ add_index :identifiers, [:body, :identifier_type_id]
13
+ add_index :identifiers, :manifestation_id
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ class AddStatementOfResponsibilityToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :statement_of_responsibility, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddLockVersionToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_column :reserves, :lock_version, :integer, :default => 0, :null => false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddLockVersionToCheckin < ActiveRecord::Migration
2
+ def change
3
+ add_column :checkins, :lock_version, :integer, :default => 0, :null => false
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class DropEmailUniqueConstraintEnjuLeafRc10 < ActiveRecord::Migration
2
+ def up
3
+ remove_index :users, :email
4
+ add_index :users, :email
5
+ end
6
+
7
+ def down
8
+ remove_index :users, :email
9
+ add_index :users, :email, unique: true
10
+ end
11
+ end
@@ -11,7 +11,18 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120602141129) do
14
+ ActiveRecord::Schema.define(:version => 20140628071719) do
15
+
16
+ create_table "accepts", :force => true do |t|
17
+ t.integer "basket_id"
18
+ t.integer "item_id"
19
+ t.integer "librarian_id"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ add_index "accepts", ["basket_id"], :name => "index_accepts_on_basket_id"
25
+ add_index "accepts", ["item_id"], :name => "index_accepts_on_item_id"
15
26
 
16
27
  create_table "agent_import_files", :force => true do |t|
17
28
  t.integer "parent_id"
@@ -132,6 +143,51 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
132
143
  add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
133
144
  add_index "agents", ["user_id"], :name => "index_agents_on_user_id", :unique => true
134
145
 
146
+ create_table "baskets", :force => true do |t|
147
+ t.integer "user_id"
148
+ t.text "note"
149
+ t.integer "lock_version", :default => 0, :null => false
150
+ t.datetime "created_at", :null => false
151
+ t.datetime "updated_at", :null => false
152
+ end
153
+
154
+ add_index "baskets", ["user_id"], :name => "index_baskets_on_user_id"
155
+
156
+ create_table "bookstores", :force => true do |t|
157
+ t.text "name", :null => false
158
+ t.string "zip_code"
159
+ t.text "address"
160
+ t.text "note"
161
+ t.string "telephone_number"
162
+ t.string "fax_number"
163
+ t.string "url"
164
+ t.integer "position"
165
+ t.datetime "deleted_at"
166
+ t.datetime "created_at", :null => false
167
+ t.datetime "updated_at", :null => false
168
+ end
169
+
170
+ create_table "budget_types", :force => true do |t|
171
+ t.string "name"
172
+ t.text "display_name"
173
+ t.text "note"
174
+ t.integer "position"
175
+ t.datetime "created_at", :null => false
176
+ t.datetime "updated_at", :null => false
177
+ end
178
+
179
+ create_table "carrier_type_has_checkout_types", :force => true do |t|
180
+ t.integer "carrier_type_id", :null => false
181
+ t.integer "checkout_type_id", :null => false
182
+ t.text "note"
183
+ t.integer "position"
184
+ t.datetime "created_at", :null => false
185
+ t.datetime "updated_at", :null => false
186
+ end
187
+
188
+ add_index "carrier_type_has_checkout_types", ["carrier_type_id"], :name => "index_carrier_type_has_checkout_types_on_m_form_id"
189
+ add_index "carrier_type_has_checkout_types", ["checkout_type_id"], :name => "index_carrier_type_has_checkout_types_on_checkout_type_id"
190
+
135
191
  create_table "carrier_types", :force => true do |t|
136
192
  t.string "name", :null => false
137
193
  t.text "display_name"
@@ -141,6 +197,119 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
141
197
  t.datetime "updated_at", :null => false
142
198
  end
143
199
 
200
+ create_table "checked_items", :force => true do |t|
201
+ t.integer "item_id", :null => false
202
+ t.integer "basket_id", :null => false
203
+ t.datetime "due_date", :null => false
204
+ t.datetime "created_at", :null => false
205
+ t.datetime "updated_at", :null => false
206
+ t.integer "librarian_id"
207
+ end
208
+
209
+ add_index "checked_items", ["basket_id"], :name => "index_checked_items_on_basket_id"
210
+ add_index "checked_items", ["item_id"], :name => "index_checked_items_on_item_id"
211
+
212
+ create_table "checkins", :force => true do |t|
213
+ t.integer "item_id", :null => false
214
+ t.integer "librarian_id"
215
+ t.integer "basket_id"
216
+ t.datetime "created_at", :null => false
217
+ t.datetime "updated_at", :null => false
218
+ t.integer "lock_version", :default => 0, :null => false
219
+ end
220
+
221
+ add_index "checkins", ["basket_id"], :name => "index_checkins_on_basket_id"
222
+ add_index "checkins", ["item_id"], :name => "index_checkins_on_item_id"
223
+ add_index "checkins", ["librarian_id"], :name => "index_checkins_on_librarian_id"
224
+
225
+ create_table "checkout_stat_has_manifestations", :force => true do |t|
226
+ t.integer "manifestation_checkout_stat_id", :null => false
227
+ t.integer "manifestation_id", :null => false
228
+ t.integer "checkouts_count"
229
+ t.datetime "created_at", :null => false
230
+ t.datetime "updated_at", :null => false
231
+ end
232
+
233
+ add_index "checkout_stat_has_manifestations", ["manifestation_checkout_stat_id"], :name => "index_checkout_stat_has_manifestations_on_checkout_stat_id"
234
+ add_index "checkout_stat_has_manifestations", ["manifestation_id"], :name => "index_checkout_stat_has_manifestations_on_manifestation_id"
235
+
236
+ create_table "checkout_stat_has_users", :force => true do |t|
237
+ t.integer "user_checkout_stat_id", :null => false
238
+ t.integer "user_id", :null => false
239
+ t.integer "checkouts_count", :default => 0, :null => false
240
+ t.datetime "created_at", :null => false
241
+ t.datetime "updated_at", :null => false
242
+ end
243
+
244
+ add_index "checkout_stat_has_users", ["user_checkout_stat_id"], :name => "index_checkout_stat_has_users_on_user_checkout_stat_id"
245
+ add_index "checkout_stat_has_users", ["user_id"], :name => "index_checkout_stat_has_users_on_user_id"
246
+
247
+ create_table "checkout_types", :force => true do |t|
248
+ t.string "name", :null => false
249
+ t.text "display_name"
250
+ t.text "note"
251
+ t.integer "position"
252
+ t.datetime "created_at", :null => false
253
+ t.datetime "updated_at", :null => false
254
+ end
255
+
256
+ add_index "checkout_types", ["name"], :name => "index_checkout_types_on_name"
257
+
258
+ create_table "checkouts", :force => true do |t|
259
+ t.integer "user_id"
260
+ t.integer "item_id", :null => false
261
+ t.integer "checkin_id"
262
+ t.integer "librarian_id"
263
+ t.integer "basket_id"
264
+ t.datetime "due_date"
265
+ t.integer "checkout_renewal_count", :default => 0, :null => false
266
+ t.integer "lock_version", :default => 0, :null => false
267
+ t.datetime "created_at", :null => false
268
+ t.datetime "updated_at", :null => false
269
+ end
270
+
271
+ add_index "checkouts", ["basket_id"], :name => "index_checkouts_on_basket_id"
272
+ add_index "checkouts", ["checkin_id"], :name => "index_checkouts_on_checkin_id"
273
+ add_index "checkouts", ["item_id", "basket_id"], :name => "index_checkouts_on_item_id_and_basket_id", :unique => true
274
+ add_index "checkouts", ["item_id"], :name => "index_checkouts_on_item_id"
275
+ add_index "checkouts", ["librarian_id"], :name => "index_checkouts_on_librarian_id"
276
+ add_index "checkouts", ["user_id"], :name => "index_checkouts_on_user_id"
277
+
278
+ create_table "circulation_statuses", :force => true do |t|
279
+ t.string "name", :null => false
280
+ t.text "display_name"
281
+ t.text "note"
282
+ t.integer "position"
283
+ t.datetime "created_at", :null => false
284
+ t.datetime "updated_at", :null => false
285
+ end
286
+
287
+ create_table "classification_types", :force => true do |t|
288
+ t.string "name", :null => false
289
+ t.text "display_name"
290
+ t.text "note"
291
+ t.integer "position"
292
+ t.datetime "created_at", :null => false
293
+ t.datetime "updated_at", :null => false
294
+ end
295
+
296
+ create_table "classifications", :force => true do |t|
297
+ t.integer "parent_id"
298
+ t.string "category", :null => false
299
+ t.text "note"
300
+ t.integer "classification_type_id", :null => false
301
+ t.datetime "created_at", :null => false
302
+ t.datetime "updated_at", :null => false
303
+ t.integer "lft"
304
+ t.integer "rgt"
305
+ t.integer "manifestation_id"
306
+ end
307
+
308
+ add_index "classifications", ["category"], :name => "index_classifications_on_category"
309
+ add_index "classifications", ["classification_type_id"], :name => "index_classifications_on_classification_type_id"
310
+ add_index "classifications", ["manifestation_id"], :name => "index_classifications_on_manifestation_id"
311
+ add_index "classifications", ["parent_id"], :name => "index_classifications_on_parent_id"
312
+
144
313
  create_table "content_types", :force => true do |t|
145
314
  t.string "name", :null => false
146
315
  t.text "display_name"
@@ -186,21 +355,6 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
186
355
  add_index "creates", ["agent_id"], :name => "index_creates_on_agent_id"
187
356
  add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
188
357
 
189
- create_table "delayed_jobs", :force => true do |t|
190
- t.integer "priority", :default => 0
191
- t.integer "attempts", :default => 0
192
- t.text "handler"
193
- t.text "last_error"
194
- t.datetime "run_at"
195
- t.datetime "locked_at"
196
- t.datetime "failed_at"
197
- t.string "locked_by"
198
- t.datetime "created_at", :null => false
199
- t.datetime "updated_at", :null => false
200
- end
201
-
202
- add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
203
-
204
358
  create_table "donates", :force => true do |t|
205
359
  t.integer "agent_id", :null => false
206
360
  t.integer "item_id", :null => false
@@ -220,6 +374,18 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
220
374
  t.datetime "updated_at", :null => false
221
375
  end
222
376
 
377
+ create_table "event_import_file_transitions", :force => true do |t|
378
+ t.string "to_state"
379
+ t.text "metadata", :default => "{}"
380
+ t.integer "sort_key"
381
+ t.integer "event_import_file_id"
382
+ t.datetime "created_at", :null => false
383
+ t.datetime "updated_at", :null => false
384
+ end
385
+
386
+ add_index "event_import_file_transitions", ["event_import_file_id"], :name => "index_event_import_file_transitions_on_event_import_file_id"
387
+ add_index "event_import_file_transitions", ["sort_key", "event_import_file_id"], :name => "index_event_import_file_transitions_on_sort_key_and_file_id", :unique => true
388
+
223
389
  create_table "event_import_files", :force => true do |t|
224
390
  t.integer "parent_id"
225
391
  t.string "content_type"
@@ -227,7 +393,6 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
227
393
  t.integer "user_id"
228
394
  t.text "note"
229
395
  t.datetime "executed_at"
230
- t.string "state"
231
396
  t.string "event_import_file_name"
232
397
  t.string "event_import_content_type"
233
398
  t.integer "event_import_file_size"
@@ -237,10 +402,10 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
237
402
  t.datetime "updated_at", :null => false
238
403
  t.string "event_import_fingerprint"
239
404
  t.text "error_message"
405
+ t.string "user_encoding"
240
406
  end
241
407
 
242
408
  add_index "event_import_files", ["parent_id"], :name => "index_event_import_files_on_parent_id"
243
- add_index "event_import_files", ["state"], :name => "index_event_import_files_on_state"
244
409
  add_index "event_import_files", ["user_id"], :name => "index_event_import_files_on_user_id"
245
410
 
246
411
  create_table "event_import_results", :force => true do |t|
@@ -306,6 +471,28 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
306
471
  t.datetime "updated_at", :null => false
307
472
  end
308
473
 
474
+ create_table "identifier_types", :force => true do |t|
475
+ t.string "name"
476
+ t.text "display_name"
477
+ t.text "note"
478
+ t.integer "position"
479
+ t.datetime "created_at", :null => false
480
+ t.datetime "updated_at", :null => false
481
+ end
482
+
483
+ create_table "identifiers", :force => true do |t|
484
+ t.string "body", :null => false
485
+ t.integer "identifier_type_id", :null => false
486
+ t.integer "manifestation_id"
487
+ t.boolean "primary"
488
+ t.integer "position"
489
+ t.datetime "created_at", :null => false
490
+ t.datetime "updated_at", :null => false
491
+ end
492
+
493
+ add_index "identifiers", ["body", "identifier_type_id"], :name => "index_identifiers_on_body_and_identifier_type_id"
494
+ add_index "identifiers", ["manifestation_id"], :name => "index_identifiers_on_manifestation_id"
495
+
309
496
  create_table "import_requests", :force => true do |t|
310
497
  t.string "isbn"
311
498
  t.string "state"
@@ -319,28 +506,44 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
319
506
  add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
320
507
  add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
321
508
 
509
+ create_table "item_has_use_restrictions", :force => true do |t|
510
+ t.integer "item_id", :null => false
511
+ t.integer "use_restriction_id", :null => false
512
+ t.datetime "created_at", :null => false
513
+ t.datetime "updated_at", :null => false
514
+ end
515
+
516
+ add_index "item_has_use_restrictions", ["item_id"], :name => "index_item_has_use_restrictions_on_item_id"
517
+ add_index "item_has_use_restrictions", ["use_restriction_id"], :name => "index_item_has_use_restrictions_on_use_restriction_id"
518
+
322
519
  create_table "items", :force => true do |t|
520
+ t.integer "manifestation_id"
323
521
  t.string "call_number"
324
522
  t.string "item_identifier"
325
- t.datetime "created_at", :null => false
326
- t.datetime "updated_at", :null => false
523
+ t.datetime "created_at", :null => false
524
+ t.datetime "updated_at", :null => false
327
525
  t.datetime "deleted_at"
328
- t.integer "shelf_id", :default => 1, :null => false
329
- t.boolean "include_supplements", :default => false, :null => false
526
+ t.integer "shelf_id", :default => 1, :null => false
527
+ t.boolean "include_supplements", :default => false, :null => false
330
528
  t.text "note"
331
529
  t.string "url"
332
530
  t.integer "price"
333
- t.integer "lock_version", :default => 0, :null => false
334
- t.integer "required_role_id", :default => 1, :null => false
531
+ t.integer "lock_version", :default => 0, :null => false
532
+ t.integer "required_role_id", :default => 1, :null => false
335
533
  t.string "state"
336
- t.integer "required_score", :default => 0, :null => false
534
+ t.integer "required_score", :default => 0, :null => false
337
535
  t.datetime "acquired_at"
338
536
  t.integer "bookstore_id"
339
537
  t.integer "budget_type_id"
538
+ t.integer "circulation_status_id", :default => 5, :null => false
539
+ t.integer "checkout_type_id", :default => 1, :null => false
340
540
  end
341
541
 
342
542
  add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
543
+ add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
544
+ add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
343
545
  add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
546
+ add_index "items", ["manifestation_id"], :name => "index_items_on_manifestation_id"
344
547
  add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
345
548
  add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
346
549
 
@@ -360,9 +563,22 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
360
563
  add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
361
564
  add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
362
565
 
566
+ create_table "lending_policies", :force => true do |t|
567
+ t.integer "item_id", :null => false
568
+ t.integer "user_group_id", :null => false
569
+ t.integer "loan_period", :default => 0, :null => false
570
+ t.datetime "fixed_due_date"
571
+ t.integer "renewal", :default => 0, :null => false
572
+ t.integer "fine", :default => 0, :null => false
573
+ t.text "note"
574
+ t.integer "position"
575
+ t.datetime "created_at", :null => false
576
+ t.datetime "updated_at", :null => false
577
+ end
578
+
579
+ add_index "lending_policies", ["item_id", "user_group_id"], :name => "index_lending_policies_on_item_id_and_user_group_id", :unique => true
580
+
363
581
  create_table "libraries", :force => true do |t|
364
- t.integer "agent_id"
365
- t.string "agent_type"
366
582
  t.string "name", :null => false
367
583
  t.text "display_name"
368
584
  t.string "short_display_name", :null => false
@@ -383,30 +599,29 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
383
599
  t.datetime "created_at", :null => false
384
600
  t.datetime "updated_at", :null => false
385
601
  t.datetime "deleted_at"
602
+ t.text "opening_hour"
386
603
  t.string "isil"
604
+ t.float "latitude"
605
+ t.float "longitude"
387
606
  end
388
607
 
389
- add_index "libraries", ["agent_id"], :name => "index_libraries_on_agent_id", :unique => true
390
608
  add_index "libraries", ["library_group_id"], :name => "index_libraries_on_library_group_id"
391
609
  add_index "libraries", ["name"], :name => "index_libraries_on_name", :unique => true
392
610
 
393
611
  create_table "library_groups", :force => true do |t|
394
- t.string "name", :null => false
612
+ t.string "name", :null => false
395
613
  t.text "display_name"
396
- t.string "short_name", :null => false
614
+ t.string "short_name", :null => false
397
615
  t.string "email"
398
616
  t.text "my_networks"
399
617
  t.text "login_banner"
400
618
  t.text "note"
401
- t.integer "valid_period_for_new_user", :default => 365, :null => false
402
- t.boolean "post_to_union_catalog", :default => false, :null => false
403
619
  t.integer "country_id"
404
- t.datetime "created_at", :null => false
405
- t.datetime "updated_at", :null => false
406
- t.text "admin_networks"
407
- t.boolean "allow_bookmark_external_url", :default => false, :null => false
408
620
  t.integer "position"
409
- t.string "url", :default => "http://localhost:3000/"
621
+ t.datetime "created_at", :null => false
622
+ t.datetime "updated_at", :null => false
623
+ t.text "admin_networks"
624
+ t.string "url", :default => "http://localhost:3000/"
410
625
  end
411
626
 
412
627
  add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
@@ -420,6 +635,19 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
420
635
  t.datetime "updated_at", :null => false
421
636
  end
422
637
 
638
+ create_table "manifestation_checkout_stats", :force => true do |t|
639
+ t.datetime "start_date"
640
+ t.datetime "end_date"
641
+ t.text "note"
642
+ t.string "state"
643
+ t.datetime "created_at", :null => false
644
+ t.datetime "updated_at", :null => false
645
+ t.datetime "started_at"
646
+ t.datetime "completed_at"
647
+ end
648
+
649
+ add_index "manifestation_checkout_stats", ["state"], :name => "index_manifestation_checkout_stats_on_state"
650
+
423
651
  create_table "manifestation_relationship_types", :force => true do |t|
424
652
  t.string "name", :null => false
425
653
  t.text "display_name"
@@ -441,6 +669,19 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
441
669
  add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
442
670
  add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
443
671
 
672
+ create_table "manifestation_reserve_stats", :force => true do |t|
673
+ t.datetime "start_date"
674
+ t.datetime "end_date"
675
+ t.text "note"
676
+ t.string "state"
677
+ t.datetime "created_at", :null => false
678
+ t.datetime "updated_at", :null => false
679
+ t.datetime "started_at"
680
+ t.datetime "completed_at"
681
+ end
682
+
683
+ add_index "manifestation_reserve_stats", ["state"], :name => "index_manifestation_reserve_stats_on_state"
684
+
444
685
  create_table "manifestations", :force => true do |t|
445
686
  t.text "original_title", :null => false
446
687
  t.text "title_alternative"
@@ -461,13 +702,6 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
461
702
  t.integer "height"
462
703
  t.integer "width"
463
704
  t.integer "depth"
464
- t.string "isbn"
465
- t.string "isbn10"
466
- t.string "wrong_isbn"
467
- t.string "nbn"
468
- t.string "lccn"
469
- t.string "oclc_number"
470
- t.string "issn"
471
705
  t.integer "price"
472
706
  t.text "fulltext"
473
707
  t.string "volume_number_string"
@@ -504,17 +738,16 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
504
738
  t.integer "year_of_publication"
505
739
  t.text "attachment_meta"
506
740
  t.integer "month_of_publication"
741
+ t.string "doi"
742
+ t.boolean "periodical"
743
+ t.text "statement_of_responsibility"
507
744
  end
508
745
 
509
746
  add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
510
747
  add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
748
+ add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
511
749
  add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
512
- add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
513
- add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
514
- add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
515
750
  add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
516
- add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
517
- add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
518
751
  add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
519
752
  add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
520
753
 
@@ -527,6 +760,53 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
527
760
  t.datetime "updated_at", :null => false
528
761
  end
529
762
 
763
+ create_table "message_requests", :force => true do |t|
764
+ t.integer "sender_id"
765
+ t.integer "receiver_id"
766
+ t.integer "message_template_id"
767
+ t.datetime "sent_at"
768
+ t.datetime "deleted_at"
769
+ t.text "body"
770
+ t.string "state"
771
+ t.datetime "created_at", :null => false
772
+ t.datetime "updated_at", :null => false
773
+ end
774
+
775
+ add_index "message_requests", ["state"], :name => "index_message_requests_on_state"
776
+
777
+ create_table "message_templates", :force => true do |t|
778
+ t.string "status", :null => false
779
+ t.text "title", :null => false
780
+ t.text "body", :null => false
781
+ t.integer "position"
782
+ t.string "locale", :default => "en"
783
+ t.datetime "created_at", :null => false
784
+ t.datetime "updated_at", :null => false
785
+ end
786
+
787
+ add_index "message_templates", ["status"], :name => "index_message_templates_on_status", :unique => true
788
+
789
+ create_table "messages", :force => true do |t|
790
+ t.datetime "read_at"
791
+ t.integer "receiver_id"
792
+ t.integer "sender_id"
793
+ t.string "subject", :null => false
794
+ t.text "body"
795
+ t.integer "message_request_id"
796
+ t.string "state"
797
+ t.integer "parent_id"
798
+ t.datetime "created_at", :null => false
799
+ t.datetime "updated_at", :null => false
800
+ t.integer "lft"
801
+ t.integer "rgt"
802
+ t.integer "depth"
803
+ end
804
+
805
+ add_index "messages", ["message_request_id"], :name => "index_messages_on_message_request_id"
806
+ add_index "messages", ["parent_id"], :name => "index_messages_on_parent_id"
807
+ add_index "messages", ["receiver_id"], :name => "index_messages_on_receiver_id"
808
+ add_index "messages", ["sender_id"], :name => "index_messages_on_sender_id"
809
+
530
810
  create_table "owns", :force => true do |t|
531
811
  t.integer "agent_id", :null => false
532
812
  t.integer "item_id", :null => false
@@ -610,6 +890,71 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
610
890
  add_index "realizes", ["agent_id"], :name => "index_realizes_on_agent_id"
611
891
  add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
612
892
 
893
+ create_table "request_status_types", :force => true do |t|
894
+ t.string "name", :null => false
895
+ t.text "display_name"
896
+ t.text "note"
897
+ t.integer "position"
898
+ t.datetime "created_at", :null => false
899
+ t.datetime "updated_at", :null => false
900
+ end
901
+
902
+ create_table "request_types", :force => true do |t|
903
+ t.string "name", :null => false
904
+ t.text "display_name"
905
+ t.text "note"
906
+ t.integer "position"
907
+ t.datetime "created_at", :null => false
908
+ t.datetime "updated_at", :null => false
909
+ end
910
+
911
+ create_table "reserve_stat_has_manifestations", :force => true do |t|
912
+ t.integer "manifestation_reserve_stat_id", :null => false
913
+ t.integer "manifestation_id", :null => false
914
+ t.integer "reserves_count"
915
+ t.datetime "created_at", :null => false
916
+ t.datetime "updated_at", :null => false
917
+ end
918
+
919
+ add_index "reserve_stat_has_manifestations", ["manifestation_id"], :name => "index_reserve_stat_has_manifestations_on_manifestation_id"
920
+ add_index "reserve_stat_has_manifestations", ["manifestation_reserve_stat_id"], :name => "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
921
+
922
+ create_table "reserve_stat_has_users", :force => true do |t|
923
+ t.integer "user_reserve_stat_id", :null => false
924
+ t.integer "user_id", :null => false
925
+ t.integer "reserves_count"
926
+ t.datetime "created_at", :null => false
927
+ t.datetime "updated_at", :null => false
928
+ end
929
+
930
+ add_index "reserve_stat_has_users", ["user_id"], :name => "index_reserve_stat_has_users_on_user_id"
931
+ add_index "reserve_stat_has_users", ["user_reserve_stat_id"], :name => "index_reserve_stat_has_users_on_user_reserve_stat_id"
932
+
933
+ create_table "reserves", :force => true do |t|
934
+ t.integer "user_id", :null => false
935
+ t.integer "manifestation_id", :null => false
936
+ t.integer "item_id"
937
+ t.integer "request_status_type_id", :null => false
938
+ t.datetime "checked_out_at"
939
+ t.datetime "created_at", :null => false
940
+ t.datetime "updated_at", :null => false
941
+ t.datetime "canceled_at"
942
+ t.datetime "expired_at"
943
+ t.datetime "deleted_at"
944
+ t.string "state"
945
+ t.boolean "expiration_notice_to_patron", :default => false
946
+ t.boolean "expiration_notice_to_library", :default => false
947
+ t.datetime "retained_at"
948
+ t.datetime "postponed_at"
949
+ t.integer "lock_version", :default => 0, :null => false
950
+ end
951
+
952
+ add_index "reserves", ["item_id"], :name => "index_reserves_on_item_id"
953
+ add_index "reserves", ["manifestation_id"], :name => "index_reserves_on_manifestation_id"
954
+ add_index "reserves", ["request_status_type_id"], :name => "index_reserves_on_request_status_type_id"
955
+ add_index "reserves", ["state"], :name => "index_reserves_on_state"
956
+ add_index "reserves", ["user_id"], :name => "index_reserves_on_user_id"
957
+
613
958
  create_table "resource_import_files", :force => true do |t|
614
959
  t.integer "parent_id"
615
960
  t.string "content_type"
@@ -624,6 +969,7 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
624
969
  t.datetime "resource_import_updated_at"
625
970
  t.datetime "created_at", :null => false
626
971
  t.datetime "updated_at", :null => false
972
+ t.string "edit_mode"
627
973
  t.string "resource_import_fingerprint"
628
974
  t.text "error_message"
629
975
  end
@@ -654,6 +1000,20 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
654
1000
  t.datetime "updated_at", :null => false
655
1001
  end
656
1002
 
1003
+ create_table "search_engines", :force => true do |t|
1004
+ t.string "name", :null => false
1005
+ t.text "display_name"
1006
+ t.string "url", :null => false
1007
+ t.text "base_url", :null => false
1008
+ t.text "http_method", :null => false
1009
+ t.text "query_param", :null => false
1010
+ t.text "additional_param"
1011
+ t.text "note"
1012
+ t.integer "position"
1013
+ t.datetime "created_at", :null => false
1014
+ t.datetime "updated_at", :null => false
1015
+ end
1016
+
657
1017
  create_table "series_has_manifestations", :force => true do |t|
658
1018
  t.integer "series_statement_id"
659
1019
  t.integer "manifestation_id"
@@ -665,30 +1025,14 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
665
1025
  add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
666
1026
  add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
667
1027
 
668
- create_table "series_statement_merge_lists", :force => true do |t|
669
- t.string "title"
670
- t.datetime "created_at", :null => false
671
- t.datetime "updated_at", :null => false
672
- end
673
-
674
- create_table "series_statement_merges", :force => true do |t|
675
- t.integer "series_statement_id", :null => false
676
- t.integer "series_statement_merge_list_id", :null => false
677
- t.datetime "created_at", :null => false
678
- t.datetime "updated_at", :null => false
679
- end
680
-
681
- add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
682
- add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
683
-
684
1028
  create_table "series_statements", :force => true do |t|
685
1029
  t.text "original_title"
686
1030
  t.text "numbering"
687
1031
  t.text "title_subseries"
688
1032
  t.text "numbering_subseries"
689
1033
  t.integer "position"
690
- t.datetime "created_at", :null => false
691
- t.datetime "updated_at", :null => false
1034
+ t.datetime "created_at", :null => false
1035
+ t.datetime "updated_at", :null => false
692
1036
  t.text "title_transcription"
693
1037
  t.text "title_alternative"
694
1038
  t.string "series_statement_identifier"
@@ -697,27 +1041,55 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
697
1041
  t.integer "manifestation_id"
698
1042
  t.text "note"
699
1043
  t.text "title_subseries_transcription"
1044
+ t.text "creator_string"
1045
+ t.text "volume_number_string"
1046
+ t.text "volume_number_transcription_string"
1047
+ t.boolean "series_master"
1048
+ t.integer "root_manifestation_id"
700
1049
  end
701
1050
 
702
1051
  add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
1052
+ add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_root_manifestation_id"
703
1053
  add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
704
1054
 
705
1055
  create_table "shelves", :force => true do |t|
706
- t.string "name", :null => false
1056
+ t.string "name", :null => false
707
1057
  t.text "display_name"
708
1058
  t.text "note"
709
- t.integer "library_id", :default => 1, :null => false
710
- t.integer "items_count", :default => 0, :null => false
1059
+ t.integer "library_id", :default => 1, :null => false
1060
+ t.integer "items_count", :default => 0, :null => false
711
1061
  t.integer "position"
712
- t.datetime "created_at", :null => false
713
- t.datetime "updated_at", :null => false
1062
+ t.datetime "created_at", :null => false
1063
+ t.datetime "updated_at", :null => false
714
1064
  t.datetime "deleted_at"
1065
+ t.boolean "closed", :default => false, :null => false
715
1066
  end
716
1067
 
717
1068
  add_index "shelves", ["library_id"], :name => "index_shelves_on_library_id"
718
1069
 
719
- create_table "user_groups", :force => true do |t|
720
- t.string "name"
1070
+ create_table "subject_has_classifications", :force => true do |t|
1071
+ t.integer "subject_id"
1072
+ t.string "subject_type"
1073
+ t.integer "classification_id", :null => false
1074
+ t.datetime "created_at", :null => false
1075
+ t.datetime "updated_at", :null => false
1076
+ end
1077
+
1078
+ add_index "subject_has_classifications", ["classification_id"], :name => "index_subject_has_classifications_on_classification_id"
1079
+ add_index "subject_has_classifications", ["subject_id"], :name => "index_subject_has_classifications_on_subject_id"
1080
+
1081
+ create_table "subject_heading_type_has_subjects", :force => true do |t|
1082
+ t.integer "subject_id", :null => false
1083
+ t.string "subject_type"
1084
+ t.integer "subject_heading_type_id", :null => false
1085
+ t.datetime "created_at", :null => false
1086
+ t.datetime "updated_at", :null => false
1087
+ end
1088
+
1089
+ add_index "subject_heading_type_has_subjects", ["subject_id"], :name => "index_subject_heading_type_has_subjects_on_subject_id"
1090
+
1091
+ create_table "subject_heading_types", :force => true do |t|
1092
+ t.string "name", :null => false
721
1093
  t.text "display_name"
722
1094
  t.text "note"
723
1095
  t.integer "position"
@@ -725,6 +1097,123 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
725
1097
  t.datetime "updated_at", :null => false
726
1098
  end
727
1099
 
1100
+ create_table "subject_types", :force => true do |t|
1101
+ t.string "name", :null => false
1102
+ t.text "display_name"
1103
+ t.text "note"
1104
+ t.integer "position"
1105
+ t.datetime "created_at", :null => false
1106
+ t.datetime "updated_at", :null => false
1107
+ end
1108
+
1109
+ create_table "subjects", :force => true do |t|
1110
+ t.integer "parent_id"
1111
+ t.integer "use_term_id"
1112
+ t.string "term"
1113
+ t.text "term_transcription"
1114
+ t.integer "subject_type_id", :null => false
1115
+ t.text "scope_note"
1116
+ t.text "note"
1117
+ t.integer "required_role_id", :default => 1, :null => false
1118
+ t.integer "lock_version", :default => 0, :null => false
1119
+ t.datetime "created_at"
1120
+ t.datetime "updated_at"
1121
+ t.datetime "deleted_at"
1122
+ t.string "url"
1123
+ t.integer "manifestation_id"
1124
+ t.integer "subject_heading_type_id"
1125
+ end
1126
+
1127
+ add_index "subjects", ["manifestation_id"], :name => "index_subjects_on_manifestation_id"
1128
+ add_index "subjects", ["parent_id"], :name => "index_subjects_on_parent_id"
1129
+ add_index "subjects", ["required_role_id"], :name => "index_subjects_on_required_role_id"
1130
+ add_index "subjects", ["subject_type_id"], :name => "index_subjects_on_subject_type_id"
1131
+ add_index "subjects", ["term"], :name => "index_subjects_on_term"
1132
+ add_index "subjects", ["use_term_id"], :name => "index_subjects_on_use_term_id"
1133
+
1134
+ create_table "subscribes", :force => true do |t|
1135
+ t.integer "subscription_id", :null => false
1136
+ t.integer "work_id", :null => false
1137
+ t.datetime "start_at", :null => false
1138
+ t.datetime "end_at", :null => false
1139
+ t.datetime "created_at", :null => false
1140
+ t.datetime "updated_at", :null => false
1141
+ end
1142
+
1143
+ add_index "subscribes", ["subscription_id"], :name => "index_subscribes_on_subscription_id"
1144
+ add_index "subscribes", ["work_id"], :name => "index_subscribes_on_work_id"
1145
+
1146
+ create_table "subscriptions", :force => true do |t|
1147
+ t.text "title", :null => false
1148
+ t.text "note"
1149
+ t.integer "user_id"
1150
+ t.integer "order_list_id"
1151
+ t.datetime "deleted_at"
1152
+ t.integer "subscribes_count", :default => 0, :null => false
1153
+ t.datetime "created_at", :null => false
1154
+ t.datetime "updated_at", :null => false
1155
+ end
1156
+
1157
+ add_index "subscriptions", ["order_list_id"], :name => "index_subscriptions_on_order_list_id"
1158
+ add_index "subscriptions", ["user_id"], :name => "index_subscriptions_on_user_id"
1159
+
1160
+ create_table "use_restrictions", :force => true do |t|
1161
+ t.string "name", :null => false
1162
+ t.text "display_name"
1163
+ t.text "note"
1164
+ t.integer "position"
1165
+ t.datetime "created_at", :null => false
1166
+ t.datetime "updated_at", :null => false
1167
+ end
1168
+
1169
+ create_table "user_checkout_stats", :force => true do |t|
1170
+ t.datetime "start_date"
1171
+ t.datetime "end_date"
1172
+ t.text "note"
1173
+ t.string "state"
1174
+ t.datetime "created_at", :null => false
1175
+ t.datetime "updated_at", :null => false
1176
+ t.datetime "started_at"
1177
+ t.datetime "completed_at"
1178
+ end
1179
+
1180
+ add_index "user_checkout_stats", ["state"], :name => "index_user_checkout_stats_on_state"
1181
+
1182
+ create_table "user_group_has_checkout_types", :force => true do |t|
1183
+ t.integer "user_group_id", :null => false
1184
+ t.integer "checkout_type_id", :null => false
1185
+ t.integer "checkout_limit", :default => 0, :null => false
1186
+ t.integer "checkout_period", :default => 0, :null => false
1187
+ t.integer "checkout_renewal_limit", :default => 0, :null => false
1188
+ t.integer "reservation_limit", :default => 0, :null => false
1189
+ t.integer "reservation_expired_period", :default => 7, :null => false
1190
+ t.boolean "set_due_date_before_closing_day", :default => false, :null => false
1191
+ t.datetime "fixed_due_date"
1192
+ t.text "note"
1193
+ t.integer "position"
1194
+ t.datetime "created_at", :null => false
1195
+ t.datetime "updated_at", :null => false
1196
+ t.integer "current_checkout_count"
1197
+ end
1198
+
1199
+ add_index "user_group_has_checkout_types", ["checkout_type_id"], :name => "index_user_group_has_checkout_types_on_checkout_type_id"
1200
+ add_index "user_group_has_checkout_types", ["user_group_id"], :name => "index_user_group_has_checkout_types_on_user_group_id"
1201
+
1202
+ create_table "user_groups", :force => true do |t|
1203
+ t.string "name"
1204
+ t.text "display_name"
1205
+ t.text "note"
1206
+ t.integer "position"
1207
+ t.datetime "created_at", :null => false
1208
+ t.datetime "updated_at", :null => false
1209
+ t.datetime "deleted_at"
1210
+ t.integer "valid_period_for_new_user", :default => 0, :null => false
1211
+ t.datetime "expired_at"
1212
+ t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
1213
+ t.integer "number_of_day_to_notify_due_date", :default => 7, :null => false
1214
+ t.integer "number_of_time_to_notify_overdue", :default => 3, :null => false
1215
+ end
1216
+
728
1217
  create_table "user_has_roles", :force => true do |t|
729
1218
  t.integer "user_id"
730
1219
  t.integer "role_id"
@@ -732,38 +1221,58 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
732
1221
  t.datetime "updated_at", :null => false
733
1222
  end
734
1223
 
735
- create_table "users", :force => true do |t|
736
- t.integer "user_group_id"
737
- t.integer "required_role_id"
738
- t.string "username"
1224
+ create_table "user_reserve_stats", :force => true do |t|
1225
+ t.datetime "start_date"
1226
+ t.datetime "end_date"
739
1227
  t.text "note"
740
- t.string "locale"
741
- t.string "user_number"
742
- t.datetime "created_at", :null => false
743
- t.datetime "updated_at", :null => false
744
- t.string "email", :default => "", :null => false
745
- t.string "encrypted_password", :default => "", :null => false
1228
+ t.string "state"
1229
+ t.datetime "created_at", :null => false
1230
+ t.datetime "updated_at", :null => false
1231
+ t.datetime "started_at"
1232
+ t.datetime "completed_at"
1233
+ end
1234
+
1235
+ add_index "user_reserve_stats", ["state"], :name => "index_user_reserve_stats_on_state"
1236
+
1237
+ create_table "users", :force => true do |t|
1238
+ t.string "email", :default => "", :null => false
1239
+ t.string "encrypted_password", :default => "", :null => false
746
1240
  t.string "reset_password_token"
747
1241
  t.datetime "reset_password_sent_at"
748
1242
  t.datetime "remember_created_at"
749
- t.integer "sign_in_count", :default => 0
1243
+ t.integer "sign_in_count", :default => 0, :null => false
750
1244
  t.datetime "current_sign_in_at"
751
1245
  t.datetime "last_sign_in_at"
752
1246
  t.string "current_sign_in_ip"
753
1247
  t.string "last_sign_in_ip"
754
- t.string "password_salt"
755
- t.string "confirmation_token"
756
- t.datetime "confirmed_at"
757
- t.datetime "confirmation_sent_at"
758
- t.string "unconfirmed_email"
759
- t.integer "failed_attempts", :default => 0
1248
+ t.datetime "created_at", :null => false
1249
+ t.datetime "updated_at", :null => false
1250
+ t.boolean "save_checkout_history", :default => false, :null => false
1251
+ t.string "checkout_icalendar_token"
1252
+ t.string "username"
1253
+ t.string "user_number"
1254
+ t.string "state"
1255
+ t.string "locale"
1256
+ t.datetime "deleted_at"
1257
+ t.datetime "expired_at"
1258
+ t.integer "library_id", :default => 1, :null => false
1259
+ t.integer "required_role_id", :default => 1, :null => false
1260
+ t.integer "user_group_id", :default => 1, :null => false
1261
+ t.text "note"
1262
+ t.text "keyword_list"
1263
+ t.integer "failed_attempts", :default => 0
760
1264
  t.string "unlock_token"
761
1265
  t.datetime "locked_at"
762
- t.string "authentication_token"
1266
+ t.datetime "confirmed_at"
763
1267
  end
764
1268
 
1269
+ add_index "users", ["checkout_icalendar_token"], :name => "index_users_on_checkout_icalendar_token", :unique => true
765
1270
  add_index "users", ["email"], :name => "index_users_on_email"
766
1271
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
1272
+ add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
1273
+ add_index "users", ["user_group_id"], :name => "index_users_on_user_group_id"
1274
+ add_index "users", ["user_number"], :name => "index_users_on_user_number", :unique => true
1275
+ add_index "users", ["username"], :name => "index_users_on_username", :unique => true
767
1276
 
768
1277
  create_table "versions", :force => true do |t|
769
1278
  t.string "item_type", :null => false
@@ -776,4 +1285,16 @@ ActiveRecord::Schema.define(:version => 20120602141129) do
776
1285
 
777
1286
  add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
778
1287
 
1288
+ create_table "work_has_subjects", :force => true do |t|
1289
+ t.integer "subject_id"
1290
+ t.string "subject_type"
1291
+ t.integer "work_id"
1292
+ t.integer "position"
1293
+ t.datetime "created_at", :null => false
1294
+ t.datetime "updated_at", :null => false
1295
+ end
1296
+
1297
+ add_index "work_has_subjects", ["subject_id"], :name => "index_work_has_subjects_on_subject_id"
1298
+ add_index "work_has_subjects", ["work_id"], :name => "index_work_has_subjects_on_work_id"
1299
+
779
1300
  end