enju_resource_merge 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/patron_merges_controller.rb +2 -4
- data/lib/enju_resource_merge/version.rb +1 -1
- data/spec/dummy/app/models/role.rb +43 -1
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/db/migrate/001_create_patrons.rb +1 -10
- data/spec/dummy/db/migrate/005_create_manifestations.rb +4 -16
- data/spec/dummy/db/migrate/006_create_items.rb +1 -9
- data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
- data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
- data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
- data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
- data/spec/dummy/db/migrate/125_create_donates.rb +1 -5
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
- data/spec/dummy/db/migrate/20080905191442_create_patron_types.rb +12 -0
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
- data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +22 -0
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +22 -0
- data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
- data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
- data/spec/dummy/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -5
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +15 -0
- data/spec/dummy/db/migrate/{20100223121519_rename_sereis_statement_title_to_original_title.rb → 20100223121519_rename_series_statement_title_to_original_title.rb} +1 -1
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +12 -0
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
- data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
- data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
- data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +1 -5
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
- data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +13 -0
- data/spec/dummy/db/migrate/20111009183423_add_ndc_to_manifestation.rb +9 -0
- data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
- data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +17 -4
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +9 -0
- data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +9 -0
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +5 -0
- data/spec/dummy/db/schema.rb +420 -89
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/carrier_types.yml +51 -0
- data/spec/fixtures/countries.yml +2059 -0
- data/spec/fixtures/languages.yml +1901 -0
- data/spec/fixtures/patron_types.yml +35 -0
- metadata +145 -47
- data/spec/dummy/app/models/create.rb +0 -4
- data/spec/dummy/app/models/donate.rb +0 -10
- data/spec/dummy/app/models/item.rb +0 -20
- data/spec/dummy/app/models/manifestation.rb +0 -188
- data/spec/dummy/app/models/own.rb +0 -22
- data/spec/dummy/app/models/patron.rb +0 -14
- data/spec/dummy/app/models/produce.rb +0 -4
- data/spec/dummy/app/models/realize.rb +0 -4
- data/spec/dummy/app/models/series_has_manifestation.rb +0 -35
- data/spec/dummy/app/models/series_statement.rb +0 -88
- data/spec/dummy/db/migrate/20111201115527_create_creates.rb +0 -10
- data/spec/dummy/db/migrate/20111201115540_create_produces.rb +0 -10
- data/spec/dummy/db/migrate/20120106093356_create_realizes.rb +0 -10
- data/spec/dummy/db/migrate/20120106093603_create_owns.rb +0 -10
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,74 +11,218 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20120602141129) do
|
15
|
+
|
16
|
+
create_table "carrier_types", :force => true do |t|
|
17
|
+
t.string "name", :null => false
|
18
|
+
t.text "display_name"
|
19
|
+
t.text "note"
|
20
|
+
t.integer "position"
|
21
|
+
t.datetime "created_at", :null => false
|
22
|
+
t.datetime "updated_at", :null => false
|
23
|
+
end
|
24
|
+
|
25
|
+
create_table "content_types", :force => true do |t|
|
26
|
+
t.string "name", :null => false
|
27
|
+
t.text "display_name"
|
28
|
+
t.text "note"
|
29
|
+
t.integer "position"
|
30
|
+
t.datetime "created_at", :null => false
|
31
|
+
t.datetime "updated_at", :null => false
|
32
|
+
end
|
33
|
+
|
34
|
+
create_table "countries", :force => true do |t|
|
35
|
+
t.string "name", :null => false
|
36
|
+
t.text "display_name"
|
37
|
+
t.string "alpha_2"
|
38
|
+
t.string "alpha_3"
|
39
|
+
t.string "numeric_3"
|
40
|
+
t.text "note"
|
41
|
+
t.integer "position"
|
42
|
+
end
|
43
|
+
|
44
|
+
add_index "countries", ["alpha_2"], :name => "index_countries_on_alpha_2"
|
45
|
+
add_index "countries", ["alpha_3"], :name => "index_countries_on_alpha_3"
|
46
|
+
add_index "countries", ["name"], :name => "index_countries_on_name"
|
47
|
+
add_index "countries", ["numeric_3"], :name => "index_countries_on_numeric_3"
|
48
|
+
|
49
|
+
create_table "create_types", :force => true do |t|
|
50
|
+
t.string "name"
|
51
|
+
t.text "display_name"
|
52
|
+
t.text "note"
|
53
|
+
t.integer "position"
|
54
|
+
t.datetime "created_at", :null => false
|
55
|
+
t.datetime "updated_at", :null => false
|
56
|
+
end
|
15
57
|
|
16
58
|
create_table "creates", :force => true do |t|
|
17
|
-
t.integer "
|
18
|
-
t.integer "
|
19
|
-
t.
|
20
|
-
t.datetime "
|
59
|
+
t.integer "patron_id", :null => false
|
60
|
+
t.integer "work_id", :null => false
|
61
|
+
t.integer "position"
|
62
|
+
t.datetime "created_at", :null => false
|
63
|
+
t.datetime "updated_at", :null => false
|
64
|
+
t.integer "create_type_id"
|
21
65
|
end
|
22
66
|
|
67
|
+
add_index "creates", ["patron_id"], :name => "index_creates_on_patron_id"
|
68
|
+
add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
|
69
|
+
|
23
70
|
create_table "donates", :force => true do |t|
|
24
71
|
t.integer "patron_id", :null => false
|
25
72
|
t.integer "item_id", :null => false
|
26
|
-
t.datetime "created_at"
|
27
|
-
t.datetime "updated_at"
|
73
|
+
t.datetime "created_at", :null => false
|
74
|
+
t.datetime "updated_at", :null => false
|
28
75
|
end
|
29
76
|
|
30
77
|
add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
|
31
78
|
add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
|
32
79
|
|
80
|
+
create_table "exemplifies", :force => true do |t|
|
81
|
+
t.integer "manifestation_id", :null => false
|
82
|
+
t.integer "item_id", :null => false
|
83
|
+
t.integer "position"
|
84
|
+
t.datetime "created_at", :null => false
|
85
|
+
t.datetime "updated_at", :null => false
|
86
|
+
end
|
87
|
+
|
88
|
+
add_index "exemplifies", ["item_id"], :name => "index_exemplifies_on_item_id", :unique => true
|
89
|
+
add_index "exemplifies", ["manifestation_id"], :name => "index_exemplifies_on_manifestation_id"
|
90
|
+
|
91
|
+
create_table "extents", :force => true do |t|
|
92
|
+
t.string "name", :null => false
|
93
|
+
t.text "display_name"
|
94
|
+
t.text "note"
|
95
|
+
t.integer "position"
|
96
|
+
t.datetime "created_at", :null => false
|
97
|
+
t.datetime "updated_at", :null => false
|
98
|
+
end
|
99
|
+
|
100
|
+
create_table "form_of_works", :force => true do |t|
|
101
|
+
t.string "name", :null => false
|
102
|
+
t.text "display_name"
|
103
|
+
t.text "note"
|
104
|
+
t.integer "position"
|
105
|
+
t.datetime "created_at", :null => false
|
106
|
+
t.datetime "updated_at", :null => false
|
107
|
+
end
|
108
|
+
|
109
|
+
create_table "frequencies", :force => true do |t|
|
110
|
+
t.string "name", :null => false
|
111
|
+
t.text "display_name"
|
112
|
+
t.text "note"
|
113
|
+
t.integer "position"
|
114
|
+
t.datetime "created_at", :null => false
|
115
|
+
t.datetime "updated_at", :null => false
|
116
|
+
end
|
117
|
+
|
118
|
+
create_table "import_requests", :force => true do |t|
|
119
|
+
t.string "isbn"
|
120
|
+
t.string "state"
|
121
|
+
t.integer "manifestation_id"
|
122
|
+
t.integer "user_id"
|
123
|
+
t.datetime "created_at", :null => false
|
124
|
+
t.datetime "updated_at", :null => false
|
125
|
+
end
|
126
|
+
|
127
|
+
add_index "import_requests", ["isbn"], :name => "index_import_requests_on_isbn"
|
128
|
+
add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
|
129
|
+
add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
|
130
|
+
|
33
131
|
create_table "items", :force => true do |t|
|
34
132
|
t.string "call_number"
|
35
133
|
t.string "item_identifier"
|
36
|
-
t.integer "circulation_status_id",
|
37
|
-
t.integer "checkout_type_id",
|
38
|
-
t.datetime "created_at"
|
39
|
-
t.datetime "updated_at"
|
134
|
+
t.integer "circulation_status_id", :default => 5, :null => false
|
135
|
+
t.integer "checkout_type_id", :default => 1, :null => false
|
136
|
+
t.datetime "created_at", :null => false
|
137
|
+
t.datetime "updated_at", :null => false
|
40
138
|
t.datetime "deleted_at"
|
41
|
-
t.integer "shelf_id",
|
42
|
-
t.
|
43
|
-
t.boolean "include_supplements", :default => false, :null => false
|
44
|
-
t.integer "checkouts_count", :default => 0, :null => false
|
45
|
-
t.integer "owns_count", :default => 0, :null => false
|
46
|
-
t.integer "resource_has_subjects_count", :default => 0, :null => false
|
139
|
+
t.integer "shelf_id", :default => 1, :null => false
|
140
|
+
t.boolean "include_supplements", :default => false, :null => false
|
47
141
|
t.text "note"
|
48
142
|
t.string "url"
|
49
143
|
t.integer "price"
|
50
|
-
t.integer "lock_version",
|
51
|
-
t.integer "required_role_id",
|
144
|
+
t.integer "lock_version", :default => 0, :null => false
|
145
|
+
t.integer "required_role_id", :default => 1, :null => false
|
52
146
|
t.string "state"
|
53
|
-
t.integer "required_score",
|
147
|
+
t.integer "required_score", :default => 0, :null => false
|
148
|
+
t.datetime "acquired_at"
|
149
|
+
t.integer "bookstore_id"
|
150
|
+
t.integer "budget_type_id"
|
54
151
|
end
|
55
152
|
|
153
|
+
add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
|
56
154
|
add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
|
57
155
|
add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
|
58
156
|
add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
|
59
157
|
add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
|
60
158
|
add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
|
61
159
|
|
160
|
+
create_table "languages", :force => true do |t|
|
161
|
+
t.string "name", :null => false
|
162
|
+
t.string "native_name"
|
163
|
+
t.text "display_name"
|
164
|
+
t.string "iso_639_1"
|
165
|
+
t.string "iso_639_2"
|
166
|
+
t.string "iso_639_3"
|
167
|
+
t.text "note"
|
168
|
+
t.integer "position"
|
169
|
+
end
|
170
|
+
|
171
|
+
add_index "languages", ["iso_639_1"], :name => "index_languages_on_iso_639_1"
|
172
|
+
add_index "languages", ["iso_639_2"], :name => "index_languages_on_iso_639_2"
|
173
|
+
add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
|
174
|
+
add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
|
175
|
+
|
176
|
+
create_table "licenses", :force => true do |t|
|
177
|
+
t.string "name", :null => false
|
178
|
+
t.string "display_name"
|
179
|
+
t.text "note"
|
180
|
+
t.integer "position"
|
181
|
+
t.datetime "created_at", :null => false
|
182
|
+
t.datetime "updated_at", :null => false
|
183
|
+
end
|
184
|
+
|
185
|
+
create_table "manifestation_relationship_types", :force => true do |t|
|
186
|
+
t.string "name", :null => false
|
187
|
+
t.text "display_name"
|
188
|
+
t.text "note"
|
189
|
+
t.integer "position"
|
190
|
+
t.datetime "created_at", :null => false
|
191
|
+
t.datetime "updated_at", :null => false
|
192
|
+
end
|
193
|
+
|
194
|
+
create_table "manifestation_relationships", :force => true do |t|
|
195
|
+
t.integer "parent_id"
|
196
|
+
t.integer "child_id"
|
197
|
+
t.integer "manifestation_relationship_type_id"
|
198
|
+
t.datetime "created_at", :null => false
|
199
|
+
t.datetime "updated_at", :null => false
|
200
|
+
t.integer "position"
|
201
|
+
end
|
202
|
+
|
203
|
+
add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
|
204
|
+
add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
|
205
|
+
|
62
206
|
create_table "manifestations", :force => true do |t|
|
63
|
-
t.text "original_title",
|
207
|
+
t.text "original_title", :null => false
|
64
208
|
t.text "title_alternative"
|
65
209
|
t.text "title_transcription"
|
66
210
|
t.string "classification_number"
|
67
211
|
t.string "manifestation_identifier"
|
68
212
|
t.datetime "date_of_publication"
|
69
|
-
t.datetime "
|
70
|
-
t.datetime "created_at"
|
71
|
-
t.datetime "updated_at"
|
213
|
+
t.datetime "date_copyrighted"
|
214
|
+
t.datetime "created_at", :null => false
|
215
|
+
t.datetime "updated_at", :null => false
|
72
216
|
t.datetime "deleted_at"
|
73
217
|
t.string "access_address"
|
74
|
-
t.integer "language_id",
|
75
|
-
t.integer "carrier_type_id",
|
76
|
-
t.integer "extent_id",
|
218
|
+
t.integer "language_id", :default => 1, :null => false
|
219
|
+
t.integer "carrier_type_id", :default => 1, :null => false
|
220
|
+
t.integer "extent_id", :default => 1, :null => false
|
77
221
|
t.integer "start_page"
|
78
222
|
t.integer "end_page"
|
79
|
-
t.
|
80
|
-
t.
|
81
|
-
t.
|
223
|
+
t.integer "height"
|
224
|
+
t.integer "width"
|
225
|
+
t.integer "depth"
|
82
226
|
t.string "isbn"
|
83
227
|
t.string "isbn10"
|
84
228
|
t.string "wrong_isbn"
|
@@ -88,22 +232,40 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
88
232
|
t.string "issn"
|
89
233
|
t.integer "price"
|
90
234
|
t.text "fulltext"
|
91
|
-
t.string "
|
92
|
-
t.string "
|
93
|
-
t.string "
|
235
|
+
t.string "volume_number_string"
|
236
|
+
t.string "issue_number_string"
|
237
|
+
t.string "serial_number_string"
|
94
238
|
t.integer "edition"
|
95
239
|
t.text "note"
|
96
|
-
t.
|
97
|
-
t.integer "
|
98
|
-
t.integer "
|
99
|
-
t.integer "work_has_subjects_count", :default => 0, :null => false
|
100
|
-
t.boolean "repository_content", :default => false, :null => false
|
101
|
-
t.integer "lock_version", :default => 0, :null => false
|
102
|
-
t.integer "required_role_id", :default => 1, :null => false
|
240
|
+
t.boolean "repository_content", :default => false, :null => false
|
241
|
+
t.integer "lock_version", :default => 0, :null => false
|
242
|
+
t.integer "required_role_id", :default => 1, :null => false
|
103
243
|
t.string "state"
|
104
|
-
t.integer "required_score",
|
105
|
-
t.integer "frequency_id",
|
106
|
-
t.boolean "subscription_master",
|
244
|
+
t.integer "required_score", :default => 0, :null => false
|
245
|
+
t.integer "frequency_id", :default => 1, :null => false
|
246
|
+
t.boolean "subscription_master", :default => false, :null => false
|
247
|
+
t.string "attachment_file_name"
|
248
|
+
t.string "attachment_content_type"
|
249
|
+
t.integer "attachment_file_size"
|
250
|
+
t.datetime "attachment_updated_at"
|
251
|
+
t.text "title_alternative_transcription"
|
252
|
+
t.text "description"
|
253
|
+
t.text "abstract"
|
254
|
+
t.datetime "available_at"
|
255
|
+
t.datetime "valid_until"
|
256
|
+
t.datetime "date_submitted"
|
257
|
+
t.datetime "date_accepted"
|
258
|
+
t.datetime "date_caputured"
|
259
|
+
t.string "pub_date"
|
260
|
+
t.string "edition_string"
|
261
|
+
t.integer "volume_number"
|
262
|
+
t.integer "issue_number"
|
263
|
+
t.integer "serial_number"
|
264
|
+
t.string "ndc"
|
265
|
+
t.integer "content_type_id", :default => 1
|
266
|
+
t.integer "year_of_publication"
|
267
|
+
t.text "attachment_meta"
|
268
|
+
t.integer "month_of_publication"
|
107
269
|
end
|
108
270
|
|
109
271
|
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
@@ -118,29 +280,104 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
118
280
|
add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
|
119
281
|
add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
|
120
282
|
|
283
|
+
create_table "medium_of_performances", :force => true do |t|
|
284
|
+
t.string "name", :null => false
|
285
|
+
t.text "display_name"
|
286
|
+
t.text "note"
|
287
|
+
t.integer "position"
|
288
|
+
t.datetime "created_at", :null => false
|
289
|
+
t.datetime "updated_at", :null => false
|
290
|
+
end
|
291
|
+
|
121
292
|
create_table "owns", :force => true do |t|
|
122
|
-
t.integer "
|
293
|
+
t.integer "patron_id", :null => false
|
294
|
+
t.integer "item_id", :null => false
|
295
|
+
t.integer "position"
|
296
|
+
t.datetime "created_at", :null => false
|
297
|
+
t.datetime "updated_at", :null => false
|
298
|
+
end
|
299
|
+
|
300
|
+
add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
|
301
|
+
add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
|
302
|
+
|
303
|
+
create_table "patron_import_files", :force => true do |t|
|
304
|
+
t.integer "parent_id"
|
305
|
+
t.string "content_type"
|
306
|
+
t.integer "size"
|
307
|
+
t.integer "user_id"
|
308
|
+
t.text "note"
|
309
|
+
t.datetime "executed_at"
|
310
|
+
t.string "state"
|
311
|
+
t.string "patron_import_file_name"
|
312
|
+
t.string "patron_import_content_type"
|
313
|
+
t.integer "patron_import_file_size"
|
314
|
+
t.datetime "patron_import_updated_at"
|
315
|
+
t.datetime "created_at", :null => false
|
316
|
+
t.datetime "updated_at", :null => false
|
317
|
+
t.string "patron_import_fingerprint"
|
318
|
+
t.text "error_message"
|
319
|
+
t.string "edit_mode"
|
320
|
+
end
|
321
|
+
|
322
|
+
add_index "patron_import_files", ["parent_id"], :name => "index_patron_import_files_on_parent_id"
|
323
|
+
add_index "patron_import_files", ["state"], :name => "index_patron_import_files_on_state"
|
324
|
+
add_index "patron_import_files", ["user_id"], :name => "index_patron_import_files_on_user_id"
|
325
|
+
|
326
|
+
create_table "patron_import_results", :force => true do |t|
|
327
|
+
t.integer "patron_import_file_id"
|
123
328
|
t.integer "patron_id"
|
124
|
-
t.
|
125
|
-
t.
|
329
|
+
t.integer "user_id"
|
330
|
+
t.text "body"
|
331
|
+
t.datetime "created_at", :null => false
|
332
|
+
t.datetime "updated_at", :null => false
|
126
333
|
end
|
127
334
|
|
128
335
|
create_table "patron_merge_lists", :force => true do |t|
|
129
336
|
t.string "title"
|
130
|
-
t.datetime "created_at"
|
131
|
-
t.datetime "updated_at"
|
337
|
+
t.datetime "created_at", :null => false
|
338
|
+
t.datetime "updated_at", :null => false
|
132
339
|
end
|
133
340
|
|
134
341
|
create_table "patron_merges", :force => true do |t|
|
135
342
|
t.integer "patron_id", :null => false
|
136
343
|
t.integer "patron_merge_list_id", :null => false
|
137
|
-
t.datetime "created_at"
|
138
|
-
t.datetime "updated_at"
|
344
|
+
t.datetime "created_at", :null => false
|
345
|
+
t.datetime "updated_at", :null => false
|
139
346
|
end
|
140
347
|
|
141
348
|
add_index "patron_merges", ["patron_id"], :name => "index_patron_merges_on_patron_id"
|
142
349
|
add_index "patron_merges", ["patron_merge_list_id"], :name => "index_patron_merges_on_patron_merge_list_id"
|
143
350
|
|
351
|
+
create_table "patron_relationship_types", :force => true do |t|
|
352
|
+
t.string "name", :null => false
|
353
|
+
t.text "display_name"
|
354
|
+
t.text "note"
|
355
|
+
t.integer "position"
|
356
|
+
t.datetime "created_at", :null => false
|
357
|
+
t.datetime "updated_at", :null => false
|
358
|
+
end
|
359
|
+
|
360
|
+
create_table "patron_relationships", :force => true do |t|
|
361
|
+
t.integer "parent_id"
|
362
|
+
t.integer "child_id"
|
363
|
+
t.integer "patron_relationship_type_id"
|
364
|
+
t.datetime "created_at", :null => false
|
365
|
+
t.datetime "updated_at", :null => false
|
366
|
+
t.integer "position"
|
367
|
+
end
|
368
|
+
|
369
|
+
add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
|
370
|
+
add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
|
371
|
+
|
372
|
+
create_table "patron_types", :force => true do |t|
|
373
|
+
t.string "name", :null => false
|
374
|
+
t.text "display_name"
|
375
|
+
t.text "note"
|
376
|
+
t.integer "position"
|
377
|
+
t.datetime "created_at", :null => false
|
378
|
+
t.datetime "updated_at", :null => false
|
379
|
+
end
|
380
|
+
|
144
381
|
create_table "patrons", :force => true do |t|
|
145
382
|
t.integer "user_id"
|
146
383
|
t.string "last_name"
|
@@ -154,8 +391,8 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
154
391
|
t.string "full_name"
|
155
392
|
t.text "full_name_transcription"
|
156
393
|
t.text "full_name_alternative"
|
157
|
-
t.datetime "created_at"
|
158
|
-
t.datetime "updated_at"
|
394
|
+
t.datetime "created_at", :null => false
|
395
|
+
t.datetime "updated_at", :null => false
|
159
396
|
t.datetime "deleted_at"
|
160
397
|
t.string "zip_code_1"
|
161
398
|
t.string "zip_code_2"
|
@@ -175,20 +412,19 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
175
412
|
t.text "region"
|
176
413
|
t.datetime "date_of_birth"
|
177
414
|
t.datetime "date_of_death"
|
178
|
-
t.integer "language_id",
|
179
|
-
t.integer "country_id",
|
180
|
-
t.integer "patron_type_id",
|
181
|
-
t.integer "lock_version",
|
415
|
+
t.integer "language_id", :default => 1, :null => false
|
416
|
+
t.integer "country_id", :default => 1, :null => false
|
417
|
+
t.integer "patron_type_id", :default => 1, :null => false
|
418
|
+
t.integer "lock_version", :default => 0, :null => false
|
182
419
|
t.text "note"
|
183
|
-
t.integer "
|
184
|
-
t.integer "
|
185
|
-
t.integer "produces_count", :default => 0, :null => false
|
186
|
-
t.integer "owns_count", :default => 0, :null => false
|
187
|
-
t.integer "required_role_id", :default => 1, :null => false
|
188
|
-
t.integer "required_score", :default => 0, :null => false
|
420
|
+
t.integer "required_role_id", :default => 1, :null => false
|
421
|
+
t.integer "required_score", :default => 0, :null => false
|
189
422
|
t.string "state"
|
190
423
|
t.text "email"
|
191
424
|
t.text "url"
|
425
|
+
t.text "full_name_alternative_transcription"
|
426
|
+
t.string "birth_date"
|
427
|
+
t.string "death_date"
|
192
428
|
end
|
193
429
|
|
194
430
|
add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
|
@@ -197,35 +433,118 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
197
433
|
add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
|
198
434
|
add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
|
199
435
|
|
436
|
+
create_table "picture_files", :force => true do |t|
|
437
|
+
t.integer "picture_attachable_id"
|
438
|
+
t.string "picture_attachable_type"
|
439
|
+
t.string "content_type"
|
440
|
+
t.text "title"
|
441
|
+
t.string "thumbnail"
|
442
|
+
t.integer "position"
|
443
|
+
t.datetime "created_at", :null => false
|
444
|
+
t.datetime "updated_at", :null => false
|
445
|
+
t.string "picture_file_name"
|
446
|
+
t.string "picture_content_type"
|
447
|
+
t.integer "picture_file_size"
|
448
|
+
t.datetime "picture_updated_at"
|
449
|
+
t.text "picture_meta"
|
450
|
+
t.string "picture_fingerprint"
|
451
|
+
end
|
452
|
+
|
453
|
+
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :name => "index_picture_files_on_picture_attachable_id_and_type"
|
454
|
+
|
455
|
+
create_table "produce_types", :force => true do |t|
|
456
|
+
t.string "name"
|
457
|
+
t.text "display_name"
|
458
|
+
t.text "note"
|
459
|
+
t.integer "position"
|
460
|
+
t.datetime "created_at", :null => false
|
461
|
+
t.datetime "updated_at", :null => false
|
462
|
+
end
|
463
|
+
|
200
464
|
create_table "produces", :force => true do |t|
|
201
|
-
t.integer "
|
202
|
-
t.integer "
|
203
|
-
t.
|
204
|
-
t.datetime "
|
465
|
+
t.integer "patron_id", :null => false
|
466
|
+
t.integer "manifestation_id", :null => false
|
467
|
+
t.integer "position"
|
468
|
+
t.datetime "created_at", :null => false
|
469
|
+
t.datetime "updated_at", :null => false
|
470
|
+
t.integer "produce_type_id"
|
471
|
+
end
|
472
|
+
|
473
|
+
add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
|
474
|
+
add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
|
475
|
+
|
476
|
+
create_table "realize_types", :force => true do |t|
|
477
|
+
t.string "name"
|
478
|
+
t.text "display_name"
|
479
|
+
t.text "note"
|
480
|
+
t.integer "position"
|
481
|
+
t.datetime "created_at", :null => false
|
482
|
+
t.datetime "updated_at", :null => false
|
205
483
|
end
|
206
484
|
|
207
485
|
create_table "realizes", :force => true do |t|
|
208
|
-
t.integer "
|
209
|
-
t.integer "
|
210
|
-
t.
|
211
|
-
t.datetime "
|
486
|
+
t.integer "patron_id", :null => false
|
487
|
+
t.integer "expression_id", :null => false
|
488
|
+
t.integer "position"
|
489
|
+
t.datetime "created_at", :null => false
|
490
|
+
t.datetime "updated_at", :null => false
|
491
|
+
t.integer "realize_type_id"
|
492
|
+
end
|
493
|
+
|
494
|
+
add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
|
495
|
+
add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
|
496
|
+
|
497
|
+
create_table "resource_import_files", :force => true do |t|
|
498
|
+
t.integer "parent_id"
|
499
|
+
t.string "content_type"
|
500
|
+
t.integer "size"
|
501
|
+
t.integer "user_id"
|
502
|
+
t.text "note"
|
503
|
+
t.datetime "executed_at"
|
504
|
+
t.string "state"
|
505
|
+
t.string "resource_import_file_name"
|
506
|
+
t.string "resource_import_content_type"
|
507
|
+
t.integer "resource_import_file_size"
|
508
|
+
t.datetime "resource_import_updated_at"
|
509
|
+
t.datetime "created_at", :null => false
|
510
|
+
t.datetime "updated_at", :null => false
|
511
|
+
t.string "edit_mode"
|
512
|
+
t.string "resource_import_fingerprint"
|
513
|
+
t.text "error_message"
|
212
514
|
end
|
213
515
|
|
516
|
+
add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
|
517
|
+
add_index "resource_import_files", ["state"], :name => "index_resource_import_files_on_state"
|
518
|
+
add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
|
519
|
+
|
520
|
+
create_table "resource_import_results", :force => true do |t|
|
521
|
+
t.integer "resource_import_file_id"
|
522
|
+
t.integer "manifestation_id"
|
523
|
+
t.integer "item_id"
|
524
|
+
t.text "body"
|
525
|
+
t.datetime "created_at", :null => false
|
526
|
+
t.datetime "updated_at", :null => false
|
527
|
+
end
|
528
|
+
|
529
|
+
add_index "resource_import_results", ["item_id"], :name => "index_resource_import_results_on_item_id"
|
530
|
+
add_index "resource_import_results", ["manifestation_id"], :name => "index_resource_import_results_on_manifestation_id"
|
531
|
+
add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
|
532
|
+
|
214
533
|
create_table "roles", :force => true do |t|
|
215
534
|
t.string "name"
|
216
535
|
t.text "display_name"
|
217
536
|
t.text "note"
|
218
537
|
t.integer "position"
|
219
|
-
t.datetime "created_at"
|
220
|
-
t.datetime "updated_at"
|
538
|
+
t.datetime "created_at", :null => false
|
539
|
+
t.datetime "updated_at", :null => false
|
221
540
|
end
|
222
541
|
|
223
542
|
create_table "series_has_manifestations", :force => true do |t|
|
224
543
|
t.integer "series_statement_id"
|
225
544
|
t.integer "manifestation_id"
|
226
545
|
t.integer "position"
|
227
|
-
t.datetime "created_at"
|
228
|
-
t.datetime "updated_at"
|
546
|
+
t.datetime "created_at", :null => false
|
547
|
+
t.datetime "updated_at", :null => false
|
229
548
|
end
|
230
549
|
|
231
550
|
add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
|
@@ -233,15 +552,15 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
233
552
|
|
234
553
|
create_table "series_statement_merge_lists", :force => true do |t|
|
235
554
|
t.string "title"
|
236
|
-
t.datetime "created_at"
|
237
|
-
t.datetime "updated_at"
|
555
|
+
t.datetime "created_at", :null => false
|
556
|
+
t.datetime "updated_at", :null => false
|
238
557
|
end
|
239
558
|
|
240
559
|
create_table "series_statement_merges", :force => true do |t|
|
241
560
|
t.integer "series_statement_id", :null => false
|
242
561
|
t.integer "series_statement_merge_list_id", :null => false
|
243
|
-
t.datetime "created_at"
|
244
|
-
t.datetime "updated_at"
|
562
|
+
t.datetime "created_at", :null => false
|
563
|
+
t.datetime "updated_at", :null => false
|
245
564
|
end
|
246
565
|
|
247
566
|
add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
|
@@ -253,25 +572,26 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
253
572
|
t.text "title_subseries"
|
254
573
|
t.text "numbering_subseries"
|
255
574
|
t.integer "position"
|
256
|
-
t.datetime "created_at"
|
257
|
-
t.datetime "updated_at"
|
575
|
+
t.datetime "created_at", :null => false
|
576
|
+
t.datetime "updated_at", :null => false
|
258
577
|
t.text "title_transcription"
|
259
578
|
t.text "title_alternative"
|
260
579
|
t.string "series_statement_identifier"
|
261
580
|
t.string "issn"
|
262
581
|
t.boolean "periodical"
|
263
|
-
t.integer "
|
582
|
+
t.integer "root_manifestation_id"
|
264
583
|
t.text "note"
|
584
|
+
t.text "title_subseries_transcription"
|
265
585
|
end
|
266
586
|
|
267
|
-
add_index "series_statements", ["
|
587
|
+
add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
|
268
588
|
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
269
589
|
|
270
590
|
create_table "user_has_roles", :force => true do |t|
|
271
591
|
t.integer "user_id"
|
272
592
|
t.integer "role_id"
|
273
|
-
t.datetime "created_at"
|
274
|
-
t.datetime "updated_at"
|
593
|
+
t.datetime "created_at", :null => false
|
594
|
+
t.datetime "updated_at", :null => false
|
275
595
|
end
|
276
596
|
|
277
597
|
create_table "users", :force => true do |t|
|
@@ -280,14 +600,14 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
280
600
|
t.string "username"
|
281
601
|
t.text "note"
|
282
602
|
t.string "locale"
|
283
|
-
t.datetime "created_at"
|
284
|
-
t.datetime "updated_at"
|
285
|
-
t.string "email",
|
286
|
-
t.string "encrypted_password", :
|
603
|
+
t.datetime "created_at", :null => false
|
604
|
+
t.datetime "updated_at", :null => false
|
605
|
+
t.string "email", :default => "", :null => false
|
606
|
+
t.string "encrypted_password", :default => "", :null => false
|
287
607
|
t.string "reset_password_token"
|
288
608
|
t.datetime "reset_password_sent_at"
|
289
609
|
t.datetime "remember_created_at"
|
290
|
-
t.integer "sign_in_count",
|
610
|
+
t.integer "sign_in_count", :default => 0
|
291
611
|
t.datetime "current_sign_in_at"
|
292
612
|
t.datetime "last_sign_in_at"
|
293
613
|
t.string "current_sign_in_ip"
|
@@ -297,4 +617,15 @@ ActiveRecord::Schema.define(:version => 20120106093603) do
|
|
297
617
|
add_index "users", ["email"], :name => "index_users_on_email"
|
298
618
|
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
299
619
|
|
620
|
+
create_table "versions", :force => true do |t|
|
621
|
+
t.string "item_type", :null => false
|
622
|
+
t.integer "item_id", :null => false
|
623
|
+
t.string "event", :null => false
|
624
|
+
t.string "whodunnit"
|
625
|
+
t.text "object"
|
626
|
+
t.datetime "created_at"
|
627
|
+
end
|
628
|
+
|
629
|
+
add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
|
630
|
+
|
300
631
|
end
|