enju_subject 0.3.1 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/Rakefile +1 -1
- data/app/controllers/classification_types_controller.rb +1 -1
- data/app/controllers/classifications_controller.rb +1 -2
- data/app/controllers/subject_heading_types_controller.rb +1 -1
- data/app/controllers/subject_types_controller.rb +1 -1
- data/app/controllers/subjects_controller.rb +2 -3
- data/app/models/classification.rb +1 -1
- data/app/models/classification_type.rb +1 -1
- data/app/models/subject.rb +1 -1
- data/app/models/subject_heading_type.rb +1 -1
- data/app/models/subject_type.rb +1 -1
- data/app/views/classification_types/_form.html.erb +1 -1
- data/app/views/manifestations/_subject_facet.html.erb +1 -1
- data/app/views/subject_heading_types/_form.html.erb +1 -1
- data/app/views/subject_types/_form.html.erb +1 -1
- data/app/views/subject_types/show.html.erb +1 -1
- data/lib/enju_subject/version.rb +1 -1
- data/lib/generators/enju_subject/setup/setup_generator.rb +0 -1
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/db/migrate/059_create_libraries.rb +3 -5
- data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
- data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -2
- data/spec/dummy/db/migrate/120_create_baskets.rb +1 -2
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +2 -5
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -2
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +0 -2
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +2 -4
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +4 -5
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -2
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
- data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +5 -0
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +14 -0
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
- data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +6 -0
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +5 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +11 -6
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
- data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +6 -0
- data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +11 -0
- data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
- data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
- data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
- data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +5 -0
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +12 -0
- data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +12 -0
- data/spec/dummy/db/schema.rb +110 -13
- data/spec/fixtures/library_groups.yml +37 -19
- data/spec/lib/generators/enju_subject/setup/setup_generator_spec.rb +1 -0
- metadata +315 -213
- data/README.rdoc +0 -10
data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
def up
|
3
|
+
add_column :resource_export_file_transitions, :most_recent, :boolean, null: true
|
4
|
+
end
|
5
|
+
|
6
|
+
def down
|
7
|
+
remove_column :resource_export_file_transitions, :most_recent
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_import_file_transitions, [:user_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :user_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_import_file_transitions, name: "index_user_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :user_export_file_transitions, [:user_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :user_export_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :user_export_file_transitions, name: "index_user_export_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :user_export_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :agent_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :agent_import_file_transitions, name: "index_agent_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :agent_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :resource_import_file_transitions, [:resource_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :resource_import_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :resource_import_file_transitions, name: "index_resource_import_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :resource_import_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :resource_export_file_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :resource_export_file_transitions, name: "index_resource_export_file_transitions_parent_most_recent"
|
11
|
+
change_column_null :resource_export_file_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[4.2]
|
2
|
+
disable_ddl_transaction!
|
3
|
+
|
4
|
+
def up
|
5
|
+
add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" #, algorithm: :concurrently
|
6
|
+
change_column_null :import_request_transitions, :most_recent, false
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
remove_index :import_request_transitions, name: "index_import_request_transitions_parent_most_recent"
|
11
|
+
change_column_null :import_request_transitions, :most_recent, true
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateCustomProperties < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :custom_properties do |t|
|
4
|
+
t.integer :resource_id, null: false
|
5
|
+
t.string :resource_type, null: false
|
6
|
+
t.text :label, null: false
|
7
|
+
t.text :value
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateManifestationCustomProperties < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :manifestation_custom_properties do |t|
|
4
|
+
t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
|
5
|
+
t.text :display_name, null: false, comment: '表示名'
|
6
|
+
t.text :note, comment: '備考'
|
7
|
+
t.integer :position, default: 1, null: false
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateItemCustomProperties < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :item_custom_properties do |t|
|
4
|
+
t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
|
5
|
+
t.text :display_name, null: false, comment: '表示名'
|
6
|
+
t.text :note, comment: '備考'
|
7
|
+
t.integer :position, default: 1, null: false
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateManifestationCustomValues < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :manifestation_custom_values do |t|
|
4
|
+
t.references :manifestation_custom_property, null: false, foreign_key: true, index: {name: 'index_manifestation_custom_values_on_custom_property_id'}
|
5
|
+
t.references :manifestation, null: false, foreign_key: true
|
6
|
+
t.text :value
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :manifestation_custom_values, [:manifestation_custom_property_id, :manifestation_id], unique: true, name: 'index_manifestation_custom_values_on_property_manifestation'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateItemCustomValues < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :item_custom_values do |t|
|
4
|
+
t.references :item_custom_property, null: false, foreign_key: true, index: {name: 'index_item_custom_values_on_custom_property_id'}
|
5
|
+
t.references :item, null: false, foreign_key: true
|
6
|
+
t.text :value
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :item_custom_values, [:item_custom_property_id, :item_id], unique: true, name: 'index_item_custom_values_on_custom_item_property_and_item_id'
|
11
|
+
end
|
12
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2020_04_25_074822) do
|
14
14
|
|
15
15
|
create_table "accepts", force: :cascade do |t|
|
16
16
|
t.integer "basket_id"
|
@@ -20,6 +20,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
20
20
|
t.datetime "updated_at"
|
21
21
|
t.index ["basket_id"], name: "index_accepts_on_basket_id"
|
22
22
|
t.index ["item_id"], name: "index_accepts_on_item_id"
|
23
|
+
t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
|
23
24
|
end
|
24
25
|
|
25
26
|
create_table "agent_import_file_transitions", force: :cascade do |t|
|
@@ -29,6 +30,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
29
30
|
t.integer "agent_import_file_id"
|
30
31
|
t.datetime "created_at"
|
31
32
|
t.datetime "updated_at"
|
33
|
+
t.boolean "most_recent", null: false
|
34
|
+
t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
32
35
|
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
33
36
|
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
34
37
|
end
|
@@ -152,10 +155,12 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
152
155
|
t.string "birth_date"
|
153
156
|
t.string "death_date"
|
154
157
|
t.string "agent_identifier"
|
158
|
+
t.integer "profile_id"
|
155
159
|
t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
|
156
160
|
t.index ["country_id"], name: "index_agents_on_country_id"
|
157
161
|
t.index ["full_name"], name: "index_agents_on_full_name"
|
158
162
|
t.index ["language_id"], name: "index_agents_on_language_id"
|
163
|
+
t.index ["profile_id"], name: "index_agents_on_profile_id"
|
159
164
|
t.index ["required_role_id"], name: "index_agents_on_required_role_id"
|
160
165
|
end
|
161
166
|
|
@@ -198,6 +203,10 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
198
203
|
t.integer "position"
|
199
204
|
t.datetime "created_at"
|
200
205
|
t.datetime "updated_at"
|
206
|
+
t.string "attachment_file_name"
|
207
|
+
t.string "attachment_content_type"
|
208
|
+
t.integer "attachment_file_size"
|
209
|
+
t.datetime "attachment_updated_at"
|
201
210
|
end
|
202
211
|
|
203
212
|
create_table "classification_types", force: :cascade do |t|
|
@@ -280,6 +289,15 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
280
289
|
t.index ["work_id"], name: "index_creates_on_work_id"
|
281
290
|
end
|
282
291
|
|
292
|
+
create_table "custom_properties", force: :cascade do |t|
|
293
|
+
t.integer "resource_id", null: false
|
294
|
+
t.string "resource_type", null: false
|
295
|
+
t.text "label", null: false
|
296
|
+
t.text "value"
|
297
|
+
t.datetime "created_at", null: false
|
298
|
+
t.datetime "updated_at", null: false
|
299
|
+
end
|
300
|
+
|
283
301
|
create_table "donates", force: :cascade do |t|
|
284
302
|
t.integer "agent_id", null: false
|
285
303
|
t.integer "item_id", null: false
|
@@ -347,6 +365,19 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
347
365
|
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
348
366
|
end
|
349
367
|
|
368
|
+
create_table "identities", force: :cascade do |t|
|
369
|
+
t.string "name"
|
370
|
+
t.string "email"
|
371
|
+
t.string "password_digest"
|
372
|
+
t.integer "profile_id"
|
373
|
+
t.datetime "created_at", null: false
|
374
|
+
t.datetime "updated_at", null: false
|
375
|
+
t.string "provider"
|
376
|
+
t.index ["email"], name: "index_identities_on_email"
|
377
|
+
t.index ["name"], name: "index_identities_on_name"
|
378
|
+
t.index ["profile_id"], name: "index_identities_on_profile_id"
|
379
|
+
end
|
380
|
+
|
350
381
|
create_table "import_request_transitions", force: :cascade do |t|
|
351
382
|
t.string "to_state"
|
352
383
|
t.text "metadata", default: "{}"
|
@@ -354,6 +385,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
354
385
|
t.integer "import_request_id"
|
355
386
|
t.datetime "created_at"
|
356
387
|
t.datetime "updated_at"
|
388
|
+
t.boolean "most_recent", null: false
|
389
|
+
t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
357
390
|
t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
358
391
|
t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
359
392
|
end
|
@@ -369,6 +402,27 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
369
402
|
t.index ["user_id"], name: "index_import_requests_on_user_id"
|
370
403
|
end
|
371
404
|
|
405
|
+
create_table "item_custom_properties", force: :cascade do |t|
|
406
|
+
t.string "name", null: false
|
407
|
+
t.text "display_name", null: false
|
408
|
+
t.text "note"
|
409
|
+
t.integer "position", default: 1, null: false
|
410
|
+
t.datetime "created_at", null: false
|
411
|
+
t.datetime "updated_at", null: false
|
412
|
+
t.index ["name"], name: "index_item_custom_properties_on_name", unique: true
|
413
|
+
end
|
414
|
+
|
415
|
+
create_table "item_custom_values", force: :cascade do |t|
|
416
|
+
t.integer "item_custom_property_id", null: false
|
417
|
+
t.integer "item_id", null: false
|
418
|
+
t.text "value"
|
419
|
+
t.datetime "created_at", null: false
|
420
|
+
t.datetime "updated_at", null: false
|
421
|
+
t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true
|
422
|
+
t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id"
|
423
|
+
t.index ["item_id"], name: "index_item_custom_values_on_item_id"
|
424
|
+
end
|
425
|
+
|
372
426
|
create_table "items", force: :cascade do |t|
|
373
427
|
t.string "call_number"
|
374
428
|
t.string "item_identifier"
|
@@ -389,7 +443,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
389
443
|
t.string "binding_item_identifier"
|
390
444
|
t.string "binding_call_number"
|
391
445
|
t.datetime "binded_at"
|
392
|
-
t.integer "manifestation_id"
|
446
|
+
t.integer "manifestation_id", null: false
|
447
|
+
t.text "memo"
|
393
448
|
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
394
449
|
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
|
395
450
|
t.index ["item_identifier"], name: "index_items_on_item_identifier"
|
@@ -427,7 +482,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
427
482
|
t.text "note"
|
428
483
|
t.integer "call_number_rows", default: 1, null: false
|
429
484
|
t.string "call_number_delimiter", default: "|", null: false
|
430
|
-
t.integer "library_group_id",
|
485
|
+
t.integer "library_group_id", null: false
|
431
486
|
t.integer "users_count", default: 0, null: false
|
432
487
|
t.integer "position"
|
433
488
|
t.integer "country_id"
|
@@ -439,7 +494,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
439
494
|
t.float "latitude"
|
440
495
|
t.float "longitude"
|
441
496
|
t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
|
442
|
-
t.index ["name"], name: "index_libraries_on_name"
|
497
|
+
t.index ["name"], name: "index_libraries_on_name"
|
443
498
|
end
|
444
499
|
|
445
500
|
create_table "library_group_translations", force: :cascade do |t|
|
@@ -458,7 +513,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
458
513
|
t.text "display_name"
|
459
514
|
t.string "short_name", null: false
|
460
515
|
t.text "my_networks"
|
461
|
-
t.text "
|
516
|
+
t.text "old_login_banner"
|
462
517
|
t.text "note"
|
463
518
|
t.integer "country_id"
|
464
519
|
t.integer "position"
|
@@ -472,6 +527,12 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
472
527
|
t.boolean "family_name_first", default: true
|
473
528
|
t.integer "pub_year_facet_range_interval", default: 10
|
474
529
|
t.integer "user_id"
|
530
|
+
t.boolean "csv_charset_conversion", default: false, null: false
|
531
|
+
t.string "header_logo_file_name"
|
532
|
+
t.string "header_logo_content_type"
|
533
|
+
t.integer "header_logo_file_size"
|
534
|
+
t.datetime "header_logo_updated_at"
|
535
|
+
t.text "header_logo_meta"
|
475
536
|
t.index ["short_name"], name: "index_library_groups_on_short_name"
|
476
537
|
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
477
538
|
end
|
@@ -485,6 +546,27 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
485
546
|
t.datetime "updated_at"
|
486
547
|
end
|
487
548
|
|
549
|
+
create_table "manifestation_custom_properties", force: :cascade do |t|
|
550
|
+
t.string "name", null: false
|
551
|
+
t.text "display_name", null: false
|
552
|
+
t.text "note"
|
553
|
+
t.integer "position", default: 1, null: false
|
554
|
+
t.datetime "created_at", null: false
|
555
|
+
t.datetime "updated_at", null: false
|
556
|
+
t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true
|
557
|
+
end
|
558
|
+
|
559
|
+
create_table "manifestation_custom_values", force: :cascade do |t|
|
560
|
+
t.integer "manifestation_custom_property_id", null: false
|
561
|
+
t.integer "manifestation_id", null: false
|
562
|
+
t.text "value"
|
563
|
+
t.datetime "created_at", null: false
|
564
|
+
t.datetime "updated_at", null: false
|
565
|
+
t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true
|
566
|
+
t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id"
|
567
|
+
t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id"
|
568
|
+
end
|
569
|
+
|
488
570
|
create_table "manifestation_relationship_types", force: :cascade do |t|
|
489
571
|
t.string "name", null: false
|
490
572
|
t.text "display_name"
|
@@ -548,7 +630,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
548
630
|
t.datetime "valid_until"
|
549
631
|
t.datetime "date_submitted"
|
550
632
|
t.datetime "date_accepted"
|
551
|
-
t.datetime "
|
633
|
+
t.datetime "date_captured"
|
552
634
|
t.string "pub_date"
|
553
635
|
t.string "edition_string"
|
554
636
|
t.integer "volume_number"
|
@@ -565,6 +647,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
565
647
|
t.text "publication_place"
|
566
648
|
t.text "extent"
|
567
649
|
t.text "dimensions"
|
650
|
+
t.text "memo"
|
568
651
|
t.index ["access_address"], name: "index_manifestations_on_access_address"
|
569
652
|
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
570
653
|
t.index ["doi"], name: "index_manifestations_on_doi"
|
@@ -659,9 +742,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
659
742
|
create_table "picture_files", force: :cascade do |t|
|
660
743
|
t.integer "picture_attachable_id"
|
661
744
|
t.string "picture_attachable_type"
|
662
|
-
t.string "content_type"
|
663
745
|
t.text "title"
|
664
|
-
t.string "thumbnail"
|
665
746
|
t.integer "position"
|
666
747
|
t.datetime "created_at"
|
667
748
|
t.datetime "updated_at"
|
@@ -671,6 +752,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
671
752
|
t.datetime "picture_updated_at"
|
672
753
|
t.text "picture_meta"
|
673
754
|
t.string "picture_fingerprint"
|
755
|
+
t.integer "picture_width"
|
756
|
+
t.integer "picture_height"
|
674
757
|
t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
675
758
|
end
|
676
759
|
|
@@ -709,6 +792,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
709
792
|
t.datetime "expired_at"
|
710
793
|
t.text "full_name_transcription"
|
711
794
|
t.datetime "date_of_birth"
|
795
|
+
t.index ["library_id"], name: "index_profiles_on_library_id"
|
796
|
+
t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
|
712
797
|
t.index ["user_id"], name: "index_profiles_on_user_id"
|
713
798
|
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
714
799
|
end
|
@@ -758,6 +843,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
758
843
|
t.integer "resource_export_file_id"
|
759
844
|
t.datetime "created_at"
|
760
845
|
t.datetime "updated_at"
|
846
|
+
t.boolean "most_recent", null: false
|
847
|
+
t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
761
848
|
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
762
849
|
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
763
850
|
end
|
@@ -780,6 +867,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
780
867
|
t.integer "resource_import_file_id"
|
781
868
|
t.datetime "created_at"
|
782
869
|
t.datetime "updated_at"
|
870
|
+
t.boolean "most_recent", null: false
|
871
|
+
t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
783
872
|
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
784
873
|
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
785
874
|
end
|
@@ -886,7 +975,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
886
975
|
t.string "name", null: false
|
887
976
|
t.text "display_name"
|
888
977
|
t.text "note"
|
889
|
-
t.integer "library_id",
|
978
|
+
t.integer "library_id", null: false
|
890
979
|
t.integer "items_count", default: 0, null: false
|
891
980
|
t.integer "position"
|
892
981
|
t.datetime "created_at"
|
@@ -969,9 +1058,11 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
969
1058
|
t.integer "user_export_file_id"
|
970
1059
|
t.datetime "created_at"
|
971
1060
|
t.datetime "updated_at"
|
972
|
-
t.boolean "most_recent"
|
1061
|
+
t.boolean "most_recent", null: false
|
973
1062
|
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1063
|
+
t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
974
1064
|
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1065
|
+
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
975
1066
|
end
|
976
1067
|
|
977
1068
|
create_table "user_export_files", force: :cascade do |t|
|
@@ -983,6 +1074,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
983
1074
|
t.datetime "executed_at"
|
984
1075
|
t.datetime "created_at"
|
985
1076
|
t.datetime "updated_at"
|
1077
|
+
t.index ["user_id"], name: "index_user_export_files_on_user_id"
|
986
1078
|
end
|
987
1079
|
|
988
1080
|
create_table "user_groups", force: :cascade do |t|
|
@@ -998,8 +1090,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
998
1090
|
end
|
999
1091
|
|
1000
1092
|
create_table "user_has_roles", force: :cascade do |t|
|
1001
|
-
t.integer "user_id"
|
1002
|
-
t.integer "role_id"
|
1093
|
+
t.integer "user_id", null: false
|
1094
|
+
t.integer "role_id", null: false
|
1003
1095
|
t.datetime "created_at"
|
1004
1096
|
t.datetime "updated_at"
|
1005
1097
|
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
@@ -1013,8 +1105,9 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
1013
1105
|
t.integer "user_import_file_id"
|
1014
1106
|
t.datetime "created_at"
|
1015
1107
|
t.datetime "updated_at"
|
1016
|
-
t.boolean "most_recent"
|
1108
|
+
t.boolean "most_recent", null: false
|
1017
1109
|
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1110
|
+
t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1018
1111
|
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1019
1112
|
end
|
1020
1113
|
|
@@ -1034,6 +1127,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
1034
1127
|
t.string "user_encoding"
|
1035
1128
|
t.integer "default_library_id"
|
1036
1129
|
t.integer "default_user_group_id"
|
1130
|
+
t.index ["user_id"], name: "index_user_import_files_on_user_id"
|
1037
1131
|
end
|
1038
1132
|
|
1039
1133
|
create_table "user_import_results", force: :cascade do |t|
|
@@ -1043,6 +1137,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
1043
1137
|
t.datetime "created_at"
|
1044
1138
|
t.datetime "updated_at"
|
1045
1139
|
t.text "error_message"
|
1140
|
+
t.index ["user_id"], name: "index_user_import_results_on_user_id"
|
1141
|
+
t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1046
1142
|
end
|
1047
1143
|
|
1048
1144
|
create_table "users", force: :cascade do |t|
|
@@ -1089,6 +1185,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
|
|
1089
1185
|
t.datetime "updated_at", null: false
|
1090
1186
|
t.index ["basket_id"], name: "index_withdraws_on_basket_id"
|
1091
1187
|
t.index ["item_id"], name: "index_withdraws_on_item_id"
|
1188
|
+
t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
|
1092
1189
|
end
|
1093
1190
|
|
1094
1191
|
end
|
@@ -1,32 +1,50 @@
|
|
1
1
|
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
2
|
one:
|
3
3
|
id: 1
|
4
|
-
name:
|
5
|
-
display_name:
|
6
|
-
short_name:
|
4
|
+
name: unknown
|
5
|
+
display_name: unknown
|
6
|
+
short_name: unknown
|
7
7
|
note:
|
8
|
-
my_networks: 0.0.0.0/0
|
8
|
+
my_networks: "0.0.0.0/0\r\n\
|
9
|
+
::/0"
|
9
10
|
url: "http://localhost:3000/"
|
10
11
|
position: 1
|
11
|
-
|
12
|
+
old_login_banner: "*Next-L Enju*"
|
13
|
+
admin_networks: "0.0.0.0/0\r\n\
|
14
|
+
::/0"
|
12
15
|
user_id: 1
|
16
|
+
pub_year_facet_range_interval: 10
|
13
17
|
|
14
18
|
# == Schema Information
|
15
19
|
#
|
16
20
|
# Table name: library_groups
|
17
21
|
#
|
18
|
-
# id
|
19
|
-
# name
|
20
|
-
# display_name
|
21
|
-
# short_name
|
22
|
-
# my_networks
|
23
|
-
#
|
24
|
-
# note
|
25
|
-
# country_id
|
26
|
-
# position
|
27
|
-
# created_at
|
28
|
-
# updated_at
|
29
|
-
# admin_networks
|
30
|
-
#
|
22
|
+
# id :integer not null, primary key
|
23
|
+
# name :string not null
|
24
|
+
# display_name :text
|
25
|
+
# short_name :string not null
|
26
|
+
# my_networks :text
|
27
|
+
# old_login_banner :text
|
28
|
+
# note :text
|
29
|
+
# country_id :integer
|
30
|
+
# position :integer default(1), not null
|
31
|
+
# created_at :datetime
|
32
|
+
# updated_at :datetime
|
33
|
+
# admin_networks :text
|
34
|
+
# allow_bookmark_external_url :boolean default(FALSE), not null
|
35
|
+
# url :string default("http://localhost:3000/")
|
36
|
+
# settings :text
|
37
|
+
# html_snippet :text
|
38
|
+
# book_jacket_source :string
|
39
|
+
# max_number_of_results :integer default(500)
|
40
|
+
# family_name_first :boolean default(TRUE)
|
41
|
+
# screenshot_generator :string
|
42
|
+
# pub_year_facet_range_interval :integer default(10)
|
43
|
+
# user_id :integer
|
44
|
+
# csv_charset_conversion :boolean default(FALSE), not null
|
45
|
+
# header_logo_file_name :string
|
46
|
+
# header_logo_content_type :string
|
47
|
+
# header_logo_file_size :integer
|
48
|
+
# header_logo_updated_at :datetime
|
49
|
+
# header_logo_meta :text
|
31
50
|
#
|
32
|
-
|