enju_question 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/app/views/answers/index.html.erb +1 -1
  2. data/app/views/questions/_list.html.erb +2 -2
  3. data/lib/enju_question/engine.rb +1 -6
  4. data/lib/enju_question/version.rb +1 -1
  5. data/spec/cassette_library/enju_ndl/crd.yml +8 -95
  6. data/spec/dummy/config/application.rb +2 -1
  7. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  8. data/spec/dummy/db/development.sqlite3 +0 -0
  9. data/spec/dummy/db/migrate/001_create_patrons.rb +53 -0
  10. data/spec/dummy/db/migrate/005_create_manifestations.rb +56 -0
  11. data/spec/dummy/db/migrate/006_create_items.rb +1 -9
  12. data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
  13. data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
  14. data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
  15. data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
  16. data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
  17. data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
  18. data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
  19. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
  20. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
  21. data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +12 -0
  22. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
  23. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
  24. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
  25. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +22 -0
  26. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +22 -0
  27. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
  28. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
  29. data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
  30. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
  31. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
  32. data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
  33. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
  34. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
  35. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
  36. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
  37. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +15 -0
  38. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
  39. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
  40. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
  41. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
  42. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
  43. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
  44. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
  45. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +12 -0
  46. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
  47. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
  48. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
  49. data/spec/dummy/db/migrate/20110425133109_add_issn_to_series_statement.rb +9 -0
  50. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  51. data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +9 -0
  52. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
  53. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
  54. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
  55. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
  56. data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +13 -0
  57. data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
  58. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
  59. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
  60. data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +13 -0
  61. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
  62. data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +9 -0
  63. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
  64. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
  65. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
  66. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
  67. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
  68. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
  69. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
  70. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
  71. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
  72. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
  73. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
  74. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +5 -0
  75. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
  76. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +5 -0
  77. data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +9 -0
  78. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +9 -0
  79. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
  80. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
  81. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +5 -0
  82. data/spec/dummy/db/schema.rb +536 -18
  83. data/spec/dummy/db/test.sqlite3 +0 -0
  84. data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
  85. data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
  86. data/spec/dummy/solr/data/test/index/_0.fnm +3 -0
  87. data/spec/dummy/solr/data/test/index/_0.frq +1 -0
  88. data/spec/dummy/solr/data/test/index/_0.nrm +1 -0
  89. data/spec/dummy/solr/data/test/index/_0.prx +0 -0
  90. data/spec/dummy/solr/data/test/index/_0.tii +0 -0
  91. data/spec/dummy/solr/data/test/index/_0.tis +0 -0
  92. data/spec/dummy/solr/data/test/index/_0_1.del +0 -0
  93. data/spec/dummy/solr/data/test/index/_1.fdt +0 -0
  94. data/spec/dummy/solr/data/test/index/_1.fdx +0 -0
  95. data/spec/dummy/solr/data/test/index/_1.fnm +3 -0
  96. data/spec/dummy/solr/data/test/index/_1.frq +1 -0
  97. data/spec/dummy/solr/data/test/index/_1.nrm +1 -0
  98. data/spec/dummy/solr/data/test/index/_1.prx +0 -0
  99. data/spec/dummy/solr/data/test/index/_1.tii +0 -0
  100. data/spec/dummy/solr/data/test/index/_1.tis +0 -0
  101. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  102. data/spec/dummy/solr/data/test/index/segments_3 +0 -0
  103. data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
  104. metadata +224 -18
  105. data/spec/dummy/app/models/item.rb +0 -5
  106. data/spec/dummy/db/migrate/20111201121636_create_languages.rb +0 -16
  107. data/spec/dummy/lib/expire_editable_fragment.rb +0 -62
  108. data/spec/dummy/solr/data/test/index/segments_1 +0 -0
@@ -24,7 +24,7 @@
24
24
  <td>
25
25
  <%- if can? :destroy, answer -%>
26
26
  <%= link_to t('page.edit'), edit_answer_path(answer) -%>
27
- <%= link_to t('page.destroy'), answer, :confirm => t('page.are_you_sure'), :method => :delete -%>
27
+ <%= link_to t('page.destroy'), answer, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
28
28
  <%- end -%>
29
29
  </td>
30
30
  </tr>
@@ -51,10 +51,10 @@
51
51
  </td>
52
52
  <td>
53
53
  <%- if can? :update, question -%>
54
- <%= link_to image_tag('icons/page_white_edit.png', :alt => t('page.edit'), :size => '16x16'), edit_question_path(question), :confirm => t('page.are_you_sure'), :method => :delete -%>
54
+ <%= link_to image_tag('icons/page_white_edit.png', :alt => t('page.edit'), :size => '16x16'), edit_question_path(question), :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
55
55
  <% end %>
56
56
  <%- if can? :destroy, question -%>
57
- <%= link_to image_tag('icons/delete.png', :alt => t('page.destroy'), :size => '16x16'), question, :confirm => t('page.are_you_sure'), :method => :delete -%>
57
+ <%= link_to image_tag('icons/delete.png', :alt => t('page.destroy'), :size => '16x16'), question, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
58
58
  <%- end -%>
59
59
  </td>
60
60
  </tr>
@@ -1,12 +1,7 @@
1
- require 'devise'
2
- require 'cancan'
3
- require 'will_paginate'
4
- require 'sunspot_rails'
5
- require 'nokogiri'
1
+ require 'enju_core'
6
2
  require 'acts-as-taggable-on'
7
3
  require 'nokogiri'
8
4
  require 'enju_ndl'
9
- require 'acts_as_list'
10
5
 
11
6
  module EnjuQuestion
12
7
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module EnjuQuestion
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
@@ -15,7 +15,7 @@ http_interactions:
15
15
  message: OK
16
16
  headers:
17
17
  date:
18
- - Wed, 28 Dec 2011 21:49:09 GMT
18
+ - Thu, 15 Dec 2011 08:18:24 GMT
19
19
  content-type:
20
20
  - application/xml;charset=UTF-8
21
21
  connection:
@@ -24,103 +24,16 @@ http_interactions:
24
24
 
25
25
  <result_set xmlns="http://crd.ndl.go.jp/refapi/servlet/refapi.RSearchAPI">
26
26
 
27
- <hit_num>5</hit_num>
27
+ <hit_num>4</hit_num>
28
28
 
29
29
  <results_get_position>1</results_get_position>
30
30
 
31
- <results_num>5</results_num>
31
+ <results_num>4</results_num>
32
32
 
33
33
  <results_cd>0001</results_cd>
34
34
 
35
35
  <result>
36
36
 
37
- <QUESTION>グリーグ「詩人の心」のCDを借りたい。
38
-
39
- yahooで検索し「自作の歌曲による12のピアノ曲集」(全音楽譜出版社)の曲だということがわかりました。『クラシック音楽作品名辞典』(三省堂)で「自作~」を引くと、「自作~」はop41とop52があり、曲の順番からいって「詩人の心」はop52の3曲目と思われますが、3曲目は「海の永遠の動きをあなたは知らない」となっています。
40
-
41
- op52の入っているCDは1枚所蔵があったのですが、その3番目の曲は「君知らず、彼の永遠の動きを」です(「グリーグ:ピアノ全曲集⑧」)。この曲と「詩人の心」は同一の曲でしょうか。
42
-
43
-
44
- (関係ないかもしれませんが、前出の「クラシック~」によると、「4つのデンマーク語の歌『心の歌』」op5の2曲目にも「海の永遠の動きをあなたは知らない」という曲があります。)
45
-
46
-
47
- 貴館でお持ちの「新・外国楽曲の呼び方」(日本放送出版協会)資料No1511395137と「洋楽索引:作曲者と原題と訳題を引き出すための上、下」(民音音楽資料館)資料No1510796988,1510796996を確認してください。
48
-
49
-
50
- 「クラシック音楽作品名辞典第3版」(三省堂)および「作曲家別名曲解説ライブラリー18北欧の巨匠」(音楽の友社)は調査済みです。</QUESTION>
51
-
52
- <REG-ID>OSPR11070035</REG-ID>
53
-
54
- <ANSWER>「海の永遠の動きをあなたは知らない」(「君知らず、彼の永遠の動きを」)と「詩人の心」は同じものでした。
55
-
56
-
57
- ①《自作の歌曲によるピアノ曲》Op.52は題名のとおり、グリーグの作曲した歌曲をピアノ曲に編曲したもので、「海の永遠の動きをあなたは知らない」Du fatter
58
- ej Bolgernes evige Gangは《4つのデンマーク語の歌「心の歌」》Op.5の第2曲に当たります。これは『グリーグ:生涯と作品』(菅野浩和/著 音楽之友社 1984.11)付録28頁に記載されています。
59
-
60
-
61
- ②「海の永遠の動きをあなたは知らない」は『クラシック音楽作品名辞典:改訂版』(井上和男/編 三省堂 1996.12)174頁にあるようにアンデルセンの詩に曲をつけたものです(事前調査された第3版にも記載されていると思います)。
62
-
63
-
64
- ③〈NAXOS MUSIC LIBRARY〉のサイトでは、
65
-
66
- 「 Du fatter ej Boigemes evige Gang (The Poet''s Heart), Op. 5, No. 2」と表記されています。
67
-
68
-
69
- http://ml.naxos.jp/album/8.553400
70
-
71
-
72
-
73
- ※『ピアノ作曲家作品事典』(中村菊子/著 大竹紀子/著 ヤマハミュージックメディア 2003.11)は「詩人の心」The Poet''s Heartと表記されています(79頁)。これは全音楽譜出版社の《自作の歌曲による12のピアノ曲》の楽譜に依っています。
74
-
75
-
76
- なお、以下の資料には「詩人の心」「海の永遠の動きをあなたは知らない」は記載されていませんでした。
77
-
78
- 『新・外国楽曲の呼び方』(日本放送協会 1962.9)
79
-
80
- 『洋楽索引:作曲者と原題と訳題を引き出すための 下巻』(民音音楽資料館 1981.2)
81
-
82
- 『洋楽索引:作曲者と原題と訳題を引き出すための 上巻』(民音音楽資料館 1975.11)
83
-
84
- </ANSWER>
85
-
86
- <CRT-DATE>2011/07/25</CRT-DATE>
87
-
88
- <KEYWORD>Du fatter ej Boigemes evige Gang  The Poet''s Heart</KEYWORD>
89
-
90
- <NDC>763</NDC>
91
-
92
- <NDC-NOTE>楽器.器楽(763:8版)</NDC-NOTE>
93
-
94
- <RES-TYPE>事実調査</RES-TYPE>
95
-
96
- <BIBL>『グリーグ:生涯と作品』(菅野浩和/著 音楽之友社 1984.11)(ページ:28)</BIBL>
97
-
98
- <BIBL>『クラシック音楽作品名辞典:改訂版』(井上和男/編 三省堂 1996.12)(ページ:174)</BIBL>
99
-
100
- <BIBL>『ピアノ作曲家作品事典:152人の作曲家たちとピアノ曲のすべて』(中村菊子/著 大竹紀子/著 ヤマハミュージックメディア 2003.11)(ページ:79)</BIBL>
101
-
102
- <BIBL>NAXOS MUSIC LIBRARY(2010/7/27現在)(ホームページ:http://ml.naxos.jp/album/8.553400)</BIBL>
103
-
104
- <REG-DATE>201112160205</REG-DATE>
105
-
106
- <LST-DATE>201112161258</LST-DATE>
107
-
108
- <SYS-ID>1000098395</SYS-ID>
109
-
110
- <LIB-ID>2120005</LIB-ID>
111
-
112
- <LIB-NAME>大阪府立中央図書館</LIB-NAME>
113
-
114
- <URL>http://crd.ndl.go.jp/GENERAL/servlet/detail.reference?id=1000098395</URL>
115
-
116
- <IMAGE>無</IMAGE>
117
-
118
- <position>0</position>
119
-
120
- </result>
121
-
122
- <result>
123
-
124
37
  <QUESTION>「極冷酒」の読み方を知りたい。尾瀬あきら著『さらに極める日本酒味わい入門』の紹介文に「熱燗、燗冷まし、割り水燗、にごり酒、日本酒カクテル、極冷酒・・・。日本酒のオツな楽しみ方が満載」とあり、原本には「極冷酒のファンタジー」の項目がありました。日本酒の辞典類には用語はなく、yahoo検索では極冷酒はありましたが読みはなし。</QUESTION>
125
38
 
126
39
  <REG-ID>5077</REG-ID>
@@ -258,7 +171,7 @@ http_interactions:
258
171
 
259
172
  <IMAGE>無</IMAGE>
260
173
 
261
- <position>1</position>
174
+ <position>0</position>
262
175
 
263
176
  </result>
264
177
 
@@ -300,7 +213,7 @@ http_interactions:
300
213
 
301
214
  <IMAGE>無</IMAGE>
302
215
 
303
- <position>2</position>
216
+ <position>1</position>
304
217
 
305
218
  </result>
306
219
 
@@ -388,7 +301,7 @@ http_interactions:
388
301
 
389
302
  <IMAGE>無</IMAGE>
390
303
 
391
- <position>3</position>
304
+ <position>2</position>
392
305
 
393
306
  </result>
394
307
 
@@ -515,7 +428,7 @@ http_interactions:
515
428
 
516
429
  <IMAGE>無</IMAGE>
517
430
 
518
- <position>4</position>
431
+ <position>3</position>
519
432
 
520
433
  </result>
521
434
 
@@ -523,5 +436,5 @@ http_interactions:
523
436
 
524
437
  '
525
438
  http_version: '1.0'
526
- recorded_at: Wed, 28 Dec 2011 21:49:10 GMT
439
+ recorded_at: Thu, 15 Dec 2011 08:18:26 GMT
527
440
  recorded_with: VCR 2.0.0.rc1
@@ -43,4 +43,5 @@ module Dummy
43
43
  end
44
44
  end
45
45
 
46
- require 'expire_editable_fragment'
46
+ require 'enju_biblio'
47
+ require 'enju_manifestation_viewer'
@@ -3,4 +3,3 @@
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
5
  # Mime::Type.register_alias "text/html", :iphone
6
- Mime::Type.register_alias "text/html", :mobile
Binary file
@@ -0,0 +1,53 @@
1
+ class CreatePatrons < ActiveRecord::Migration
2
+ def change
3
+ create_table :patrons do |t|
4
+ t.integer :user_id
5
+ t.string :last_name
6
+ t.string :middle_name
7
+ t.string :first_name
8
+ t.string :last_name_transcription
9
+ t.string :middle_name_transcription
10
+ t.string :first_name_transcription
11
+ t.string :corporate_name
12
+ t.string :corporate_name_transcription
13
+ t.string :full_name
14
+ t.text :full_name_transcription
15
+ t.text :full_name_alternative
16
+ t.timestamps
17
+ t.datetime :deleted_at
18
+ t.string :zip_code_1
19
+ t.string :zip_code_2
20
+ t.text :address_1
21
+ t.text :address_2
22
+ t.text :address_1_note
23
+ t.text :address_2_note
24
+ t.string :telephone_number_1
25
+ t.string :telephone_number_2
26
+ t.string :fax_number_1
27
+ t.string :fax_number_2
28
+ t.text :other_designation
29
+ t.text :place
30
+ t.string :postal_code
31
+ t.text :street
32
+ t.text :locality
33
+ t.text :region
34
+ t.datetime :date_of_birth
35
+ t.datetime :date_of_death
36
+ t.integer :language_id, :default => 1, :null => false
37
+ t.integer :country_id, :default => 1, :null => false
38
+ t.integer :patron_type_id, :default => 1, :null => false
39
+ t.integer :lock_version, :default => 0, :null => false
40
+ t.text :note
41
+ t.integer :required_role_id, :default => 1, :null => false
42
+ t.integer :required_score, :default => 0, :null => false
43
+ t.string :state
44
+ t.text :email
45
+ t.text :url
46
+ end
47
+ add_index :patrons, :user_id, :unique => true
48
+ add_index :patrons, :language_id
49
+ add_index :patrons, :country_id
50
+ add_index :patrons, :required_role_id
51
+ add_index :patrons, :full_name
52
+ end
53
+ end
@@ -0,0 +1,56 @@
1
+ class CreateManifestations < ActiveRecord::Migration
2
+ def change
3
+ create_table :manifestations do |t|
4
+ t.text :original_title, :null => false
5
+ t.text :title_alternative
6
+ t.text :title_transcription
7
+ t.string :classification_number
8
+ t.string :manifestation_identifier
9
+ t.datetime :date_of_publication
10
+ t.datetime :copyright_date
11
+ t.timestamps
12
+ t.datetime :deleted_at
13
+ t.string :access_address
14
+ t.integer :language_id, :default => 1, :null => false
15
+ t.integer :carrier_type_id, :default => 1, :null => false
16
+ t.integer :extent_id, :default => 1, :null => false
17
+ t.integer :start_page
18
+ t.integer :end_page
19
+ t.integer :height
20
+ t.integer :width
21
+ t.integer :depth
22
+ t.string :isbn
23
+ t.string :isbn10
24
+ t.string :wrong_isbn
25
+ t.string :nbn
26
+ t.string :lccn
27
+ t.string :oclc_number
28
+ t.string :issn
29
+ t.integer :price # TODO: 通貨単位
30
+ t.text :fulltext
31
+ t.string :volume_number_list
32
+ t.string :issue_number_list
33
+ t.string :serial_number_list
34
+ t.integer :edition
35
+ t.text :note
36
+ t.boolean :repository_content, :default => false, :null => false
37
+ t.integer :lock_version, :default => 0, :null => false
38
+ t.integer :required_role_id, :default => 1, :null => false
39
+ t.string :state
40
+ t.integer :required_score, :default => 0, :null => false
41
+ t.integer :frequency_id, :default => 1, :null => false
42
+ t.boolean :subscription_master, :default => false, :null => false
43
+ end
44
+ add_index :manifestations, :carrier_type_id
45
+ add_index :manifestations, :required_role_id
46
+ add_index :manifestations, :isbn
47
+ add_index :manifestations, :nbn
48
+ add_index :manifestations, :lccn
49
+ add_index :manifestations, :oclc_number
50
+ add_index :manifestations, :issn
51
+ add_index :manifestations, :access_address
52
+ add_index :manifestations, :frequency_id
53
+ add_index :manifestations, :manifestation_identifier
54
+ add_index :manifestations, :updated_at
55
+ end
56
+ end
@@ -1,5 +1,5 @@
1
1
  class CreateItems < ActiveRecord::Migration
2
- def self.up
2
+ def change
3
3
  create_table :items do |t|
4
4
  #t.integer :manifestation_id
5
5
  t.string :call_number
@@ -9,11 +9,7 @@ class CreateItems < ActiveRecord::Migration
9
9
  t.timestamps
10
10
  t.datetime :deleted_at
11
11
  t.integer :shelf_id, :default => 1, :null => false
12
- t.integer :basket_id
13
12
  t.boolean :include_supplements, :default => false, :null => false
14
- t.integer :checkouts_count, :default => 0, :null => false
15
- t.integer :owns_count, :default => 0, :null => false
16
- t.integer :resource_has_subjects_count, :default => 0, :null => false
17
13
  t.text :note
18
14
  t.string :url
19
15
  t.integer :price
@@ -29,8 +25,4 @@ class CreateItems < ActiveRecord::Migration
29
25
  add_index :items, :item_identifier
30
26
  add_index :items, :required_role_id
31
27
  end
32
-
33
- def self.down
34
- drop_table :items
35
- end
36
28
  end
@@ -0,0 +1,12 @@
1
+ class CreateOwns < ActiveRecord::Migration
2
+ def change
3
+ create_table :owns do |t|
4
+ t.references :patron, :null => false
5
+ t.references :item, :null => false
6
+ t.integer :position
7
+ t.timestamps
8
+ end
9
+ add_index :owns, :patron_id
10
+ add_index :owns, :item_id
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateCreates < ActiveRecord::Migration
2
+ def change
3
+ create_table :creates do |t|
4
+ t.references :patron, :null => false
5
+ t.references :work, :null => false
6
+ t.integer :position
7
+ t.timestamps
8
+ end
9
+ add_index :creates, :patron_id
10
+ add_index :creates, :work_id
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateProduces < ActiveRecord::Migration
2
+ def change
3
+ create_table :produces do |t|
4
+ t.references :patron, :null => false
5
+ t.references :manifestation, :null => false
6
+ t.integer :position
7
+ t.timestamps
8
+ end
9
+ add_index :produces, :patron_id
10
+ add_index :produces, :manifestation_id
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ class CreateCarrierTypes < ActiveRecord::Migration
2
+ def change
3
+ create_table :carrier_types do |t|
4
+ t.string :name, :null => false
5
+ t.text :display_name
6
+ t.text :note
7
+ t.integer :position
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ class CreateFrequencies < ActiveRecord::Migration
2
+ def change
3
+ create_table :frequencies 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,12 @@
1
+ class CreateFormOfWorks < ActiveRecord::Migration
2
+ def change
3
+ create_table :form_of_works 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,12 @@
1
+ class CreateDonates < ActiveRecord::Migration
2
+ def change
3
+ create_table :donates do |t|
4
+ t.integer :patron_id, :null => false
5
+ t.integer :item_id, :null => false
6
+
7
+ t.timestamps
8
+ end
9
+ add_index :donates, :patron_id
10
+ add_index :donates, :item_id
11
+ end
12
+ end