enju_biblio 0.1.0.pre10 → 0.1.0.pre11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. data/app/models/accept.rb +4 -3
  2. data/app/models/carrier_type.rb +4 -4
  3. data/app/models/content_type.rb +4 -4
  4. data/app/models/country.rb +2 -2
  5. data/app/models/create.rb +5 -6
  6. data/app/models/create_type.rb +3 -3
  7. data/app/models/donate.rb +5 -5
  8. data/app/models/exemplify.rb +5 -15
  9. data/app/models/extent.rb +4 -4
  10. data/app/models/form_of_work.rb +4 -4
  11. data/app/models/frequency.rb +4 -4
  12. data/app/models/import_request.rb +3 -3
  13. data/app/models/item.rb +13 -11
  14. data/app/models/language.rb +2 -2
  15. data/app/models/license.rb +4 -4
  16. data/app/models/manifestation.rb +55 -30
  17. data/app/models/manifestation_relationship.rb +3 -3
  18. data/app/models/manifestation_relationship_type.rb +4 -4
  19. data/app/models/medium_of_performance.rb +4 -4
  20. data/app/models/own.rb +5 -5
  21. data/app/models/patron.rb +10 -10
  22. data/app/models/patron_import_file.rb +11 -5
  23. data/app/models/patron_import_result.rb +3 -3
  24. data/app/models/patron_relationship.rb +3 -3
  25. data/app/models/patron_relationship_type.rb +4 -4
  26. data/app/models/patron_type.rb +4 -4
  27. data/app/models/picture_file.rb +3 -3
  28. data/app/models/produce.rb +5 -6
  29. data/app/models/produce_type.rb +3 -3
  30. data/app/models/realize.rb +5 -6
  31. data/app/models/realize_type.rb +3 -3
  32. data/app/models/resource_import_file.rb +64 -14
  33. data/app/models/resource_import_result.rb +3 -3
  34. data/app/models/series_has_manifestation.rb +3 -3
  35. data/app/models/series_statement.rb +16 -8
  36. data/app/models/series_statement_relationship.rb +13 -0
  37. data/db/migrate/20120516020924_add_online_isbn_to_manifestation.rb +5 -0
  38. data/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
  39. data/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  40. data/db/migrate/20121119153944_add_manifestation_id_to_item.rb +5 -0
  41. data/lib/enju_biblio/version.rb +1 -1
  42. data/spec/dummy/db/development.sqlite3 +0 -0
  43. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +1 -1
  44. data/spec/dummy/db/schema.rb +13 -11
  45. data/spec/dummy/db/test.sqlite3 +0 -0
  46. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  47. data/spec/dummy/solr/data/test/index/segments_b72 +0 -0
  48. data/spec/fixtures/carrier_types.yml +4 -4
  49. data/spec/fixtures/content_types.yml +4 -4
  50. data/spec/fixtures/countries.yml +2 -2
  51. data/spec/fixtures/create_types.yml +3 -3
  52. data/spec/fixtures/creates.yml +5 -6
  53. data/spec/fixtures/donates.yml +5 -5
  54. data/spec/fixtures/exemplifies.yml +5 -6
  55. data/spec/fixtures/extents.yml +4 -4
  56. data/spec/fixtures/form_of_works.yml +4 -4
  57. data/spec/fixtures/frequencies.yml +4 -4
  58. data/spec/fixtures/import_requests.yml +3 -3
  59. data/spec/fixtures/items.yml +12 -10
  60. data/spec/fixtures/languages.yml +3 -3
  61. data/spec/fixtures/licenses.yml +4 -4
  62. data/spec/fixtures/manifestation_relationship_types.yml +4 -4
  63. data/spec/fixtures/manifestation_relationships.yml +3 -3
  64. data/spec/fixtures/manifestations.yml +17 -21
  65. data/spec/fixtures/medium_of_performances.yml +4 -4
  66. data/spec/fixtures/owns.yml +5 -5
  67. data/spec/fixtures/patron_import_files.yml +3 -3
  68. data/spec/fixtures/patron_import_results.yml +3 -3
  69. data/spec/fixtures/patron_relationship_types.yml +4 -4
  70. data/spec/fixtures/patron_relationships.yml +3 -3
  71. data/spec/fixtures/patron_types.yml +4 -4
  72. data/spec/fixtures/patrons.yml +10 -14
  73. data/spec/fixtures/picture_files.yml +3 -3
  74. data/spec/fixtures/produce_types.yml +3 -3
  75. data/spec/fixtures/produces.yml +5 -6
  76. data/spec/fixtures/realize_types.yml +3 -3
  77. data/spec/fixtures/realizes.yml +5 -6
  78. data/spec/fixtures/resource_import_files.yml +3 -3
  79. data/spec/fixtures/resource_import_results.yml +3 -3
  80. data/spec/fixtures/series_has_manifestations.yml +3 -3
  81. data/spec/fixtures/series_statements.yml +4 -5
  82. data/spec/fixtures/user_group_has_checkout_types.yml +1 -1
  83. data/spec/models/accept_spec.rb +4 -3
  84. data/spec/models/carrier_type_spec.rb +4 -4
  85. data/spec/models/content_type_spec.rb +4 -4
  86. data/spec/models/country_spec.rb +2 -2
  87. data/spec/models/create_spec.rb +5 -6
  88. data/spec/models/create_type_spec.rb +3 -3
  89. data/spec/models/donate_spec.rb +5 -5
  90. data/spec/models/exemplify_spec.rb +5 -5
  91. data/spec/models/extent_spec.rb +4 -4
  92. data/spec/models/form_of_work_spec.rb +4 -4
  93. data/spec/models/frequency_spec.rb +4 -4
  94. data/spec/models/import_request_spec.rb +3 -3
  95. data/spec/models/item_spec.rb +20 -10
  96. data/spec/models/language_spec.rb +2 -2
  97. data/spec/models/license_spec.rb +4 -4
  98. data/spec/models/manifestation_relationship_spec.rb +3 -3
  99. data/spec/models/manifestation_relationship_type_spec.rb +4 -4
  100. data/spec/models/manifestation_spec.rb +17 -14
  101. data/spec/models/medium_of_performance_spec.rb +4 -4
  102. data/spec/models/own_spec.rb +5 -5
  103. data/spec/models/patron_import_file_spec.rb +3 -3
  104. data/spec/models/patron_import_result_spec.rb +3 -3
  105. data/spec/models/patron_relationship_spec.rb +3 -3
  106. data/spec/models/patron_relationship_type_spec.rb +4 -4
  107. data/spec/models/patron_spec.rb +10 -15
  108. data/spec/models/patron_type_spec.rb +4 -4
  109. data/spec/models/picture_file_spec.rb +3 -3
  110. data/spec/models/produce_spec.rb +5 -6
  111. data/spec/models/produce_type_spec.rb +3 -3
  112. data/spec/models/realize_spec.rb +5 -6
  113. data/spec/models/realize_type_spec.rb +3 -3
  114. data/spec/models/resource_import_file_spec.rb +3 -3
  115. data/spec/models/resource_import_result_spec.rb +3 -3
  116. data/spec/models/series_has_manifestation_spec.rb +3 -3
  117. data/spec/models/series_statement_relationship_spec.rb +13 -0
  118. data/spec/models/series_statement_spec.rb +4 -5
  119. metadata +10 -6
  120. data/spec/dummy/solr/data/test/index/segments_8fm +0 -0
data/app/models/accept.rb CHANGED
@@ -22,15 +22,16 @@ class Accept < ActiveRecord::Base
22
22
  item.save(:validate => false)
23
23
  end
24
24
  end
25
+
25
26
  # == Schema Information
26
27
  #
27
28
  # Table name: accepts
28
29
  #
29
- # id :integer not null, primary key
30
+ # id :integer not null, primary key
30
31
  # basket_id :integer
31
32
  # item_id :integer
32
33
  # librarian_id :integer
33
- # created_at :datetime not null
34
- # updated_at :datetime not null
34
+ # created_at :datetime not null
35
+ # updated_at :datetime not null
35
36
  #
36
37
 
@@ -23,12 +23,12 @@ end
23
23
  #
24
24
  # Table name: carrier_types
25
25
  #
26
- # id :integer not null, primary key
27
- # name :string(255) not null
26
+ # id :integer not null, primary key
27
+ # name :string(255) not null
28
28
  # display_name :text
29
29
  # note :text
30
30
  # position :integer
31
- # created_at :datetime
32
- # updated_at :datetime
31
+ # created_at :datetime not null
32
+ # updated_at :datetime not null
33
33
  #
34
34
 
@@ -9,12 +9,12 @@ end
9
9
  #
10
10
  # Table name: content_types
11
11
  #
12
- # id :integer not null, primary key
13
- # name :string(255) not null
12
+ # id :integer not null, primary key
13
+ # name :string(255) not null
14
14
  # display_name :text
15
15
  # note :text
16
16
  # position :integer
17
- # created_at :datetime
18
- # updated_at :datetime
17
+ # created_at :datetime not null
18
+ # updated_at :datetime not null
19
19
  #
20
20
 
@@ -33,8 +33,8 @@ end
33
33
  #
34
34
  # Table name: countries
35
35
  #
36
- # id :integer not null, primary key
37
- # name :string(255) not null
36
+ # id :integer not null, primary key
37
+ # name :string(255) not null
38
38
  # display_name :text
39
39
  # alpha_2 :string(255)
40
40
  # alpha_3 :string(255)
data/app/models/create.rb CHANGED
@@ -18,17 +18,16 @@ class Create < ActiveRecord::Base
18
18
  end
19
19
  end
20
20
 
21
-
22
21
  # == Schema Information
23
22
  #
24
23
  # Table name: creates
25
24
  #
26
- # id :integer not null, primary key
27
- # patron_id :integer not null
28
- # work_id :integer not null
25
+ # id :integer not null, primary key
26
+ # patron_id :integer not null
27
+ # work_id :integer not null
29
28
  # position :integer
30
- # created_at :datetime not null
31
- # updated_at :datetime not null
29
+ # created_at :datetime not null
30
+ # updated_at :datetime not null
32
31
  # create_type_id :integer
33
32
  #
34
33
 
@@ -8,12 +8,12 @@ end
8
8
  #
9
9
  # Table name: create_types
10
10
  #
11
- # id :integer not null, primary key
11
+ # id :integer not null, primary key
12
12
  # name :string(255)
13
13
  # display_name :text
14
14
  # note :text
15
15
  # position :integer
16
- # created_at :datetime
17
- # updated_at :datetime
16
+ # created_at :datetime not null
17
+ # updated_at :datetime not null
18
18
  #
19
19
 
data/app/models/donate.rb CHANGED
@@ -10,10 +10,10 @@ end
10
10
  #
11
11
  # Table name: donates
12
12
  #
13
- # id :integer not null, primary key
14
- # patron_id :integer not null
15
- # item_id :integer not null
16
- # created_at :datetime
17
- # updated_at :datetime
13
+ # id :integer not null, primary key
14
+ # patron_id :integer not null
15
+ # item_id :integer not null
16
+ # created_at :datetime not null
17
+ # updated_at :datetime not null
18
18
  #
19
19
 
@@ -16,27 +16,17 @@ class Exemplify < ActiveRecord::Base
16
16
  manifestation.try(:index)
17
17
  item.try(:index)
18
18
  end
19
-
20
- if defined?(EnjuCirculation)
21
- after_create :create_lending_policy
22
-
23
- def create_lending_policy
24
- UserGroupHasCheckoutType.available_for_item(item).each do |rule|
25
- LendingPolicy.create!(:item_id => item.id, :user_group_id => rule.user_group_id, :fixed_due_date => rule.fixed_due_date, :loan_period => rule.checkout_period, :renewal => rule.checkout_renewal_limit)
26
- end
27
- end
28
- end
29
19
  end
30
20
 
31
21
  # == Schema Information
32
22
  #
33
23
  # Table name: exemplifies
34
24
  #
35
- # id :integer not null, primary key
36
- # manifestation_id :integer not null
37
- # item_id :integer not null
25
+ # id :integer not null, primary key
26
+ # manifestation_id :integer not null
27
+ # item_id :integer not null
38
28
  # position :integer
39
- # created_at :datetime not null
40
- # updated_at :datetime not null
29
+ # created_at :datetime not null
30
+ # updated_at :datetime not null
41
31
  #
42
32
 
data/app/models/extent.rb CHANGED
@@ -9,12 +9,12 @@ end
9
9
  #
10
10
  # Table name: extents
11
11
  #
12
- # id :integer not null, primary key
13
- # name :string(255) not null
12
+ # id :integer not null, primary key
13
+ # name :string(255) not null
14
14
  # display_name :text
15
15
  # note :text
16
16
  # position :integer
17
- # created_at :datetime
18
- # updated_at :datetime
17
+ # created_at :datetime not null
18
+ # updated_at :datetime not null
19
19
  #
20
20
 
@@ -9,12 +9,12 @@ end
9
9
  #
10
10
  # Table name: form_of_works
11
11
  #
12
- # id :integer not null, primary key
13
- # name :string(255) not null
12
+ # id :integer not null, primary key
13
+ # name :string(255) not null
14
14
  # display_name :text
15
15
  # note :text
16
16
  # position :integer
17
- # created_at :datetime
18
- # updated_at :datetime
17
+ # created_at :datetime not null
18
+ # updated_at :datetime not null
19
19
  #
20
20
 
@@ -9,12 +9,12 @@ end
9
9
  #
10
10
  # Table name: frequencies
11
11
  #
12
- # id :integer not null, primary key
13
- # name :string(255) not null
12
+ # id :integer not null, primary key
13
+ # name :string(255) not null
14
14
  # display_name :text
15
15
  # note :text
16
16
  # position :integer
17
- # created_at :datetime
18
- # updated_at :datetime
17
+ # created_at :datetime not null
18
+ # updated_at :datetime not null
19
19
  #
20
20
 
@@ -57,12 +57,12 @@ end
57
57
  #
58
58
  # Table name: import_requests
59
59
  #
60
- # id :integer not null, primary key
60
+ # id :integer not null, primary key
61
61
  # isbn :string(255)
62
62
  # state :string(255)
63
63
  # manifestation_id :integer
64
64
  # user_id :integer
65
- # created_at :datetime
66
- # updated_at :datetime
65
+ # created_at :datetime not null
66
+ # updated_at :datetime not null
67
67
  #
68
68
 
data/app/models/item.rb CHANGED
@@ -49,7 +49,7 @@ class Item < ActiveRecord::Base
49
49
 
50
50
  enju_circulation_item_model if defined?(EnjuCirculation)
51
51
 
52
- attr_accessor :library_id, :manifestation_id
52
+ attr_accessor :library_id
53
53
 
54
54
  if defined?(EnjuInventory)
55
55
  has_many :inventories, :dependent => :destroy
@@ -152,29 +152,31 @@ class Item < ActiveRecord::Base
152
152
  end
153
153
  end
154
154
  end
155
+
155
156
  # == Schema Information
156
157
  #
157
158
  # Table name: items
158
159
  #
159
- # id :integer not null, primary key
160
+ # id :integer not null, primary key
160
161
  # call_number :string(255)
161
162
  # item_identifier :string(255)
162
- # circulation_status_id :integer default(5), not null
163
- # checkout_type_id :integer default(1), not null
164
- # created_at :datetime not null
165
- # updated_at :datetime not null
163
+ # circulation_status_id :integer default(5), not null
164
+ # checkout_type_id :integer default(1), not null
165
+ # created_at :datetime not null
166
+ # updated_at :datetime not null
166
167
  # deleted_at :datetime
167
- # shelf_id :integer default(1), not null
168
- # include_supplements :boolean default(FALSE), not null
168
+ # shelf_id :integer default(1), not null
169
+ # include_supplements :boolean default(FALSE), not null
169
170
  # note :text
170
171
  # url :string(255)
171
172
  # price :integer
172
- # lock_version :integer default(0), not null
173
- # required_role_id :integer default(1), not null
173
+ # lock_version :integer default(0), not null
174
+ # required_role_id :integer default(1), not null
174
175
  # state :string(255)
175
- # required_score :integer default(0), not null
176
+ # required_score :integer default(0), not null
176
177
  # acquired_at :datetime
177
178
  # bookstore_id :integer
178
179
  # budget_type_id :integer
180
+ # manifestation_id :integer
179
181
  #
180
182
 
@@ -35,8 +35,8 @@ end
35
35
  #
36
36
  # Table name: languages
37
37
  #
38
- # id :integer not null, primary key
39
- # name :string(255) not null
38
+ # id :integer not null, primary key
39
+ # name :string(255) not null
40
40
  # native_name :string(255)
41
41
  # display_name :text
42
42
  # iso_639_1 :string(255)
@@ -8,12 +8,12 @@ end
8
8
  #
9
9
  # Table name: licenses
10
10
  #
11
- # id :integer not null, primary key
12
- # name :string(255) not null
11
+ # id :integer not null, primary key
12
+ # name :string(255) not null
13
13
  # display_name :string(255)
14
14
  # note :text
15
15
  # position :integer
16
- # created_at :datetime
17
- # updated_at :datetime
16
+ # created_at :datetime not null
17
+ # updated_at :datetime not null
18
18
  #
19
19
 
@@ -11,6 +11,8 @@ class Manifestation < ActiveRecord::Base
11
11
  :pub_date, :edition_string, :volume_number, :issue_number, :serial_number,
12
12
  :ndc, :content_type_id, :online_isbn, :attachment,
13
13
  :series_has_manifestation_attributes
14
+ attr_accessible :fulltext_content, :online_isbn,
15
+ :doi, :number_of_page_string
14
16
 
15
17
  scope :periodical_master, where(:periodical => false)
16
18
  scope :periodical_children, where(:periodical => true)
@@ -64,7 +66,7 @@ class Manifestation < ActiveRecord::Base
64
66
  publisher.join('').gsub(/\s/, '').downcase
65
67
  end
66
68
  string :isbn, :multiple => true do
67
- [isbn, isbn10, wrong_isbn]
69
+ [isbn, isbn10, wrong_isbn, online_isbn]
68
70
  end
69
71
  string :issn, :multiple => true do
70
72
  if series_statement
@@ -86,7 +88,11 @@ class Manifestation < ActiveRecord::Base
86
88
  end
87
89
  end
88
90
  string :language do
89
- language.try(:name)
91
+ if periodical_master?
92
+ series_statement.last_issue.try(:language).try(:name)
93
+ else
94
+ language.try(:name)
95
+ end
90
96
  end
91
97
  string :item_identifier, :multiple => true do
92
98
  if periodical_master?
@@ -102,7 +108,11 @@ class Manifestation < ActiveRecord::Base
102
108
  time :updated_at
103
109
  time :deleted_at
104
110
  time :pub_date, :multiple => true do
105
- pub_dates
111
+ if periodical_master?
112
+ series_statement.manifestations.map{|m| m.pub_dates}.flatten
113
+ else
114
+ pub_dates
115
+ end
106
116
  end
107
117
  time :date_of_publication
108
118
  integer :creator_ids, :multiple => true
@@ -114,9 +124,9 @@ class Manifestation < ActiveRecord::Base
114
124
  integer :height
115
125
  integer :width
116
126
  integer :depth
117
- integer :volume_number, :multiple => true
118
- integer :issue_number, :multiple => true
119
- integer :serial_number, :multiple => true
127
+ integer :volume_number
128
+ integer :issue_number
129
+ integer :serial_number
120
130
  integer :start_page
121
131
  integer :end_page
122
132
  integer :number_of_pages
@@ -127,10 +137,10 @@ class Manifestation < ActiveRecord::Base
127
137
  boolean :repository_content
128
138
  # for OpenURL
129
139
  text :aulast do
130
- creators.map{|creator| creator.last_name}
140
+ creators.pluck(:last_name)
131
141
  end
132
142
  text :aufirst do
133
- creators.map{|creator| creator.first_name}
143
+ creators.pluck(:first_name)
134
144
  end
135
145
  # OTC start
136
146
  string :creator, :multiple => true do
@@ -153,7 +163,7 @@ class Manifestation < ActiveRecord::Base
153
163
  end
154
164
  end
155
165
  text :isbn do # 前方一致検索のためtext指定を追加
156
- [isbn, isbn10, wrong_isbn]
166
+ [isbn, isbn10, wrong_isbn, online_isbn]
157
167
  end
158
168
  text :issn do # 前方一致検索のためtext指定を追加
159
169
  if series_statement
@@ -163,6 +173,7 @@ class Manifestation < ActiveRecord::Base
163
173
  end
164
174
  end
165
175
  string :sort_title
176
+ string :doi
166
177
  boolean :periodical do
167
178
  periodical?
168
179
  end
@@ -219,6 +230,11 @@ class Manifestation < ActiveRecord::Base
219
230
  errors.add(:isbn)
220
231
  end
221
232
  end
233
+ if online_isbn.present?
234
+ unless StdNum::ISBN.valid?(online_isbn)
235
+ errors.add(:online_isbn)
236
+ end
237
+ end
222
238
  end
223
239
 
224
240
  def check_issn
@@ -263,8 +279,12 @@ class Manifestation < ActiveRecord::Base
263
279
 
264
280
  def set_date_of_publication
265
281
  return if pub_date.blank?
266
- date = nil
267
- pub_date_string = pub_date.gsub(/[\[\]]/, '')
282
+ begin
283
+ date = Time.zone.parse(pub_date)
284
+ rescue ArgumentError, TZInfo::AmbiguousTime
285
+ date = nil
286
+ end
287
+ pub_date_string = pub_date.split(';').first.gsub(/[\[\]]/, '')
268
288
 
269
289
  while date.nil? do
270
290
  pub_date_string += '-01'
@@ -410,13 +430,15 @@ class Manifestation < ActiveRecord::Base
410
430
  end
411
431
 
412
432
  def self.find_by_isbn(isbn)
433
+ online_lisbn = Lisbn.new(isbn.to_s)
434
+ if online_lisbn.valid?
435
+ manifestation = Manifestation.where(:online_isbn => online_lisbn.isbn).first || Manifestation.where(:online_isbn => online_lisbn.isbn10).first
436
+ return manifestation if manifestation
437
+ end
438
+
413
439
  lisbn = Lisbn.new(isbn.to_s)
414
440
  if lisbn.valid?
415
- if lisbn.isbn.size == 10
416
- Manifestation.where(:isbn => lisbn.isbn13).first || Manifestation.where(:isbn => lisbn.isbn10).first
417
- else
418
- Manifestation.where(:isbn => lisbn.isbn13).first || Manifestation.where(:isbn => lisbn.isbn10).first
419
- end
441
+ Manifestation.where(:isbn => lisbn.isbn13).first || Manifestation.where(:isbn => lisbn.isbn10).first
420
442
  end
421
443
  end
422
444
 
@@ -622,21 +644,21 @@ end
622
644
  #
623
645
  # Table name: manifestations
624
646
  #
625
- # id :integer not null, primary key
626
- # original_title :text not null
647
+ # id :integer not null, primary key
648
+ # original_title :text not null
627
649
  # title_alternative :text
628
650
  # title_transcription :text
629
651
  # classification_number :string(255)
630
652
  # manifestation_identifier :string(255)
631
653
  # date_of_publication :datetime
632
654
  # date_copyrighted :datetime
633
- # created_at :datetime not null
634
- # updated_at :datetime not null
655
+ # created_at :datetime not null
656
+ # updated_at :datetime not null
635
657
  # deleted_at :datetime
636
658
  # access_address :string(255)
637
- # language_id :integer default(1), not null
638
- # carrier_type_id :integer default(1), not null
639
- # extent_id :integer default(1), not null
659
+ # language_id :integer default(1), not null
660
+ # carrier_type_id :integer default(1), not null
661
+ # extent_id :integer default(1), not null
640
662
  # start_page :integer
641
663
  # end_page :integer
642
664
  # height :integer
@@ -656,13 +678,13 @@ end
656
678
  # serial_number_string :string(255)
657
679
  # edition :integer
658
680
  # note :text
659
- # repository_content :boolean default(FALSE), not null
660
- # lock_version :integer default(0), not null
661
- # required_role_id :integer default(1), not null
681
+ # repository_content :boolean default(FALSE), not null
682
+ # lock_version :integer default(0), not null
683
+ # required_role_id :integer default(1), not null
662
684
  # state :string(255)
663
- # required_score :integer default(0), not null
664
- # frequency_id :integer default(1), not null
665
- # subscription_master :boolean default(FALSE), not null
685
+ # required_score :integer default(0), not null
686
+ # frequency_id :integer default(1), not null
687
+ # subscription_master :boolean default(FALSE), not null
666
688
  # attachment_file_name :string(255)
667
689
  # attachment_content_type :string(255)
668
690
  # attachment_file_size :integer
@@ -681,9 +703,12 @@ end
681
703
  # issue_number :integer
682
704
  # serial_number :integer
683
705
  # ndc :string(255)
684
- # content_type_id :integer default(1)
706
+ # content_type_id :integer default(1)
685
707
  # year_of_publication :integer
686
708
  # attachment_meta :text
687
709
  # month_of_publication :integer
710
+ # online_isbn :string(255)
711
+ # fulltext_content :boolean
712
+ # doi :string(255)
688
713
  #
689
714
 
@@ -19,12 +19,12 @@ end
19
19
  #
20
20
  # Table name: manifestation_relationships
21
21
  #
22
- # id :integer not null, primary key
22
+ # id :integer not null, primary key
23
23
  # parent_id :integer
24
24
  # child_id :integer
25
25
  # manifestation_relationship_type_id :integer
26
- # created_at :datetime
27
- # updated_at :datetime
26
+ # created_at :datetime not null
27
+ # updated_at :datetime not null
28
28
  # position :integer
29
29
  #
30
30
 
@@ -9,12 +9,12 @@ end
9
9
  #
10
10
  # Table name: manifestation_relationship_types
11
11
  #
12
- # id :integer not null, primary key
13
- # name :string(255) not null
12
+ # id :integer not null, primary key
13
+ # name :string(255) not null
14
14
  # display_name :text
15
15
  # note :text
16
16
  # position :integer
17
- # created_at :datetime
18
- # updated_at :datetime
17
+ # created_at :datetime not null
18
+ # updated_at :datetime not null
19
19
  #
20
20
 
@@ -9,12 +9,12 @@ end
9
9
  #
10
10
  # Table name: medium_of_performances
11
11
  #
12
- # id :integer not null, primary key
13
- # name :string(255) not null
12
+ # id :integer not null, primary key
13
+ # name :string(255) not null
14
14
  # display_name :text
15
15
  # note :text
16
16
  # position :integer
17
- # created_at :datetime
18
- # updated_at :datetime
17
+ # created_at :datetime not null
18
+ # updated_at :datetime not null
19
19
  #
20
20
 
data/app/models/own.rb CHANGED
@@ -23,11 +23,11 @@ end
23
23
  #
24
24
  # Table name: owns
25
25
  #
26
- # id :integer not null, primary key
27
- # patron_id :integer not null
28
- # item_id :integer not null
26
+ # id :integer not null, primary key
27
+ # patron_id :integer not null
28
+ # item_id :integer not null
29
29
  # position :integer
30
- # created_at :datetime not null
31
- # updated_at :datetime not null
30
+ # created_at :datetime not null
31
+ # updated_at :datetime not null
32
32
  #
33
33
 
data/app/models/patron.rb CHANGED
@@ -258,12 +258,11 @@ class Patron < ActiveRecord::Base
258
258
  end
259
259
  end
260
260
 
261
-
262
261
  # == Schema Information
263
262
  #
264
263
  # Table name: patrons
265
264
  #
266
- # id :integer not null, primary key
265
+ # id :integer not null, primary key
267
266
  # user_id :integer
268
267
  # last_name :string(255)
269
268
  # middle_name :string(255)
@@ -276,8 +275,8 @@ end
276
275
  # full_name :string(255)
277
276
  # full_name_transcription :text
278
277
  # full_name_alternative :text
279
- # created_at :datetime not null
280
- # updated_at :datetime not null
278
+ # created_at :datetime not null
279
+ # updated_at :datetime not null
281
280
  # deleted_at :datetime
282
281
  # zip_code_1 :string(255)
283
282
  # zip_code_2 :string(255)
@@ -297,18 +296,19 @@ end
297
296
  # region :text
298
297
  # date_of_birth :datetime
299
298
  # date_of_death :datetime
300
- # language_id :integer default(1), not null
301
- # country_id :integer default(1), not null
302
- # patron_type_id :integer default(1), not null
303
- # lock_version :integer default(0), not null
299
+ # language_id :integer default(1), not null
300
+ # country_id :integer default(1), not null
301
+ # patron_type_id :integer default(1), not null
302
+ # lock_version :integer default(0), not null
304
303
  # note :text
305
- # required_role_id :integer default(1), not null
306
- # required_score :integer default(0), not null
304
+ # required_role_id :integer default(1), not null
305
+ # required_score :integer default(0), not null
307
306
  # state :string(255)
308
307
  # email :text
309
308
  # url :text
310
309
  # full_name_alternative_transcription :text
311
310
  # birth_date :string(255)
312
311
  # death_date :string(255)
312
+ # patron_identifier :string(255)
313
313
  #
314
314