enju_oai 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +11 -0
- data/app/controllers/oai_controller.rb +1 -0
- data/app/views/oai/list_identifiers.xml.builder +8 -10
- data/app/views/oai/list_records.xml.builder +16 -18
- data/lib/enju_oai/oai_controller.rb +1 -0
- data/lib/enju_oai/version.rb +1 -1
- data/spec/cassette_library/oai/list_records_xml_builder/when_metadataPrefix_is_dcndl/renders_well-formed_XML.yml +25 -24
- data/spec/controllers/oai_controller_spec.rb +25 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/database.yml +17 -22
- 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/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/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/20170305064014_add_csv_charset_conversion_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/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 +86 -16
- data/spec/factories/user.rb +6 -15
- data/spec/views/oai/list_identifiers.xml.builder_spec.rb +11 -4
- data/spec/views/oai/list_records.xml.builder_spec.rb +32 -20
- metadata +360 -295
- data/README.rdoc +0 -10
@@ -1,12 +1,10 @@
|
|
1
1
|
class CreateUserHasRoles < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :user_has_roles do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.references :user, index: true, foreign_key: true, null: false
|
5
|
+
t.references :role, index: true, foreign_key: true, null: false
|
6
6
|
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
add_index :user_has_roles, :user_id
|
10
|
-
add_index :user_has_roles, :role_id
|
11
9
|
end
|
12
10
|
end
|
@@ -1,14 +1,11 @@
|
|
1
1
|
class CreateAccepts < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :accepts do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :basket, index: true
|
5
|
+
t.references :item, index: true
|
6
|
+
t.references :librarian, index: true
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
|
-
|
11
|
-
add_index :accepts, :basket_id
|
12
|
-
add_index :accepts, :item_id
|
13
10
|
end
|
14
11
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
class CreateUserImportResults < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :user_import_results do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.references :user_import_file, index: true
|
5
|
+
t.references :user, index: true
|
6
6
|
t.text :body
|
7
7
|
|
8
8
|
t.timestamps
|
@@ -1,20 +1,19 @@
|
|
1
1
|
class CreateProfiles < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :profiles do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :user, index: true, foreign_key: true
|
5
|
+
t.references :user_group, index: true
|
6
|
+
t.references :library, index: true
|
7
7
|
t.string :locale
|
8
8
|
t.string :user_number
|
9
9
|
t.text :full_name
|
10
10
|
t.text :note
|
11
11
|
t.text :keyword_list
|
12
|
-
t.
|
12
|
+
t.references :required_role, index: false
|
13
13
|
|
14
14
|
t.timestamps
|
15
15
|
end
|
16
16
|
|
17
|
-
add_index :profiles, :user_id
|
18
17
|
add_index :profiles, :user_number, unique: true
|
19
18
|
end
|
20
19
|
end
|
@@ -8,11 +8,10 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration[4.2]
|
|
8
8
|
t.text :metadata, default: "{}"
|
9
9
|
end
|
10
10
|
t.integer :sort_key
|
11
|
-
t.
|
11
|
+
t.references :user_import_file, index: true
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
14
|
|
15
|
-
add_index :user_import_file_transitions, :user_import_file_id
|
16
15
|
add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
|
17
16
|
end
|
18
17
|
end
|
@@ -1,14 +1,12 @@
|
|
1
1
|
class CreateColors < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :colors do |t|
|
4
|
-
t.
|
4
|
+
t.references :library_group, index: true
|
5
5
|
t.string :property
|
6
6
|
t.string :code
|
7
7
|
t.integer :position
|
8
8
|
|
9
9
|
t.timestamps
|
10
10
|
end
|
11
|
-
|
12
|
-
add_index :colors, :library_group_id
|
13
11
|
end
|
14
12
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
class CreateWithdraws < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
create_table :withdraws do |t|
|
4
|
-
t.
|
5
|
-
t.
|
6
|
-
t.
|
4
|
+
t.references :basket, index: true
|
5
|
+
t.references :item, index: true
|
6
|
+
t.references :librarian, index: true
|
7
7
|
|
8
8
|
t.timestamps null: false
|
9
9
|
end
|
10
|
-
add_index :withdraws, :basket_id
|
11
|
-
add_index :withdraws, :item_id
|
12
10
|
end
|
13
11
|
end
|
@@ -1,13 +1,18 @@
|
|
1
|
+
# This migration comes from enju_library_engine (originally 20151213070943)
|
1
2
|
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
2
3
|
def up
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
if defined?(Globalize)
|
5
|
+
LibraryGroup.create_translation_table!({
|
6
|
+
login_banner: :text
|
7
|
+
}, {
|
8
|
+
migrate_data: true
|
9
|
+
})
|
10
|
+
end
|
8
11
|
end
|
9
12
|
|
10
13
|
def down
|
11
|
-
|
14
|
+
if defined?(Globalize)
|
15
|
+
LibraryGroup.drop_translation_table! migrate_data: true
|
16
|
+
end
|
12
17
|
end
|
13
18
|
end
|
@@ -1,9 +1,22 @@
|
|
1
|
+
# This migration comes from enju_library_engine (originally 20151213072705)
|
1
2
|
class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[4.2]
|
2
3
|
def up
|
3
|
-
|
4
|
+
if defined?(Globalize)
|
5
|
+
LibraryGroup.add_translation_fields! footer_banner: :text
|
6
|
+
end
|
7
|
+
|
8
|
+
if defined?(AwesomeHstoreTranslate)
|
9
|
+
add_column :library_groups, :footer_banner, :hstore
|
10
|
+
end
|
4
11
|
end
|
5
12
|
|
6
13
|
def down
|
7
|
-
|
14
|
+
if defined?(Globalize)
|
15
|
+
remove_column :library_group_translations, :footer_banner
|
16
|
+
end
|
17
|
+
|
18
|
+
if defined?(AwesomeHstoreTranslate)
|
19
|
+
remove_column :library_groups, :footer_banner
|
20
|
+
end
|
8
21
|
end
|
9
22
|
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: 20171126135238) 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,7 +30,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
29
30
|
t.integer "agent_import_file_id"
|
30
31
|
t.datetime "created_at"
|
31
32
|
t.datetime "updated_at"
|
32
|
-
t.boolean "most_recent"
|
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"
|
33
35
|
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
34
36
|
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
35
37
|
end
|
@@ -153,10 +155,12 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
153
155
|
t.string "birth_date"
|
154
156
|
t.string "death_date"
|
155
157
|
t.string "agent_identifier"
|
158
|
+
t.integer "profile_id"
|
156
159
|
t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
|
157
160
|
t.index ["country_id"], name: "index_agents_on_country_id"
|
158
161
|
t.index ["full_name"], name: "index_agents_on_full_name"
|
159
162
|
t.index ["language_id"], name: "index_agents_on_language_id"
|
163
|
+
t.index ["profile_id"], name: "index_agents_on_profile_id"
|
160
164
|
t.index ["required_role_id"], name: "index_agents_on_required_role_id"
|
161
165
|
end
|
162
166
|
|
@@ -377,6 +381,15 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
377
381
|
t.index ["work_id"], name: "index_creates_on_work_id"
|
378
382
|
end
|
379
383
|
|
384
|
+
create_table "custom_properties", force: :cascade do |t|
|
385
|
+
t.integer "resource_id", null: false
|
386
|
+
t.string "resource_type", null: false
|
387
|
+
t.text "label", null: false
|
388
|
+
t.text "value"
|
389
|
+
t.datetime "created_at", null: false
|
390
|
+
t.datetime "updated_at", null: false
|
391
|
+
end
|
392
|
+
|
380
393
|
create_table "donates", force: :cascade do |t|
|
381
394
|
t.integer "agent_id", null: false
|
382
395
|
t.integer "item_id", null: false
|
@@ -531,7 +544,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
531
544
|
t.integer "import_request_id"
|
532
545
|
t.datetime "created_at"
|
533
546
|
t.datetime "updated_at"
|
534
|
-
t.boolean "most_recent"
|
547
|
+
t.boolean "most_recent", null: false
|
548
|
+
t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
535
549
|
t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
536
550
|
t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
537
551
|
end
|
@@ -547,6 +561,27 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
547
561
|
t.index ["user_id"], name: "index_import_requests_on_user_id"
|
548
562
|
end
|
549
563
|
|
564
|
+
create_table "item_custom_properties", force: :cascade do |t|
|
565
|
+
t.string "name", null: false
|
566
|
+
t.text "display_name", null: false
|
567
|
+
t.text "note"
|
568
|
+
t.integer "position", default: 1, null: false
|
569
|
+
t.datetime "created_at", null: false
|
570
|
+
t.datetime "updated_at", null: false
|
571
|
+
t.index ["name"], name: "index_item_custom_properties_on_name", unique: true
|
572
|
+
end
|
573
|
+
|
574
|
+
create_table "item_custom_values", force: :cascade do |t|
|
575
|
+
t.integer "item_custom_property_id", null: false
|
576
|
+
t.integer "item_id", null: false
|
577
|
+
t.text "value"
|
578
|
+
t.datetime "created_at", null: false
|
579
|
+
t.datetime "updated_at", null: false
|
580
|
+
t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true
|
581
|
+
t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id"
|
582
|
+
t.index ["item_id"], name: "index_item_custom_values_on_item_id"
|
583
|
+
end
|
584
|
+
|
550
585
|
create_table "item_has_use_restrictions", force: :cascade do |t|
|
551
586
|
t.integer "item_id", null: false
|
552
587
|
t.integer "use_restriction_id", null: false
|
@@ -578,7 +613,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
578
613
|
t.string "binding_item_identifier"
|
579
614
|
t.string "binding_call_number"
|
580
615
|
t.datetime "binded_at"
|
581
|
-
t.integer "manifestation_id"
|
616
|
+
t.integer "manifestation_id", null: false
|
617
|
+
t.text "memo"
|
582
618
|
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
583
619
|
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
|
584
620
|
t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id"
|
@@ -632,7 +668,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
632
668
|
t.text "note"
|
633
669
|
t.integer "call_number_rows", default: 1, null: false
|
634
670
|
t.string "call_number_delimiter", default: "|", null: false
|
635
|
-
t.integer "library_group_id",
|
671
|
+
t.integer "library_group_id", null: false
|
636
672
|
t.integer "users_count", default: 0, null: false
|
637
673
|
t.integer "position"
|
638
674
|
t.integer "country_id"
|
@@ -644,7 +680,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
644
680
|
t.float "latitude"
|
645
681
|
t.float "longitude"
|
646
682
|
t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
|
647
|
-
t.index ["name"], name: "index_libraries_on_name"
|
683
|
+
t.index ["name"], name: "index_libraries_on_name"
|
648
684
|
end
|
649
685
|
|
650
686
|
create_table "library_group_translations", force: :cascade do |t|
|
@@ -677,10 +713,12 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
677
713
|
t.boolean "family_name_first", default: true
|
678
714
|
t.integer "pub_year_facet_range_interval", default: 10
|
679
715
|
t.integer "user_id"
|
716
|
+
t.boolean "csv_charset_conversion", default: false, null: false
|
680
717
|
t.string "header_logo_file_name"
|
681
718
|
t.string "header_logo_content_type"
|
682
719
|
t.integer "header_logo_file_size"
|
683
720
|
t.datetime "header_logo_updated_at"
|
721
|
+
t.text "header_logo_meta"
|
684
722
|
t.index ["short_name"], name: "index_library_groups_on_short_name"
|
685
723
|
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
686
724
|
end
|
@@ -717,6 +755,27 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
717
755
|
t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
|
718
756
|
end
|
719
757
|
|
758
|
+
create_table "manifestation_custom_properties", force: :cascade do |t|
|
759
|
+
t.string "name", null: false
|
760
|
+
t.text "display_name", null: false
|
761
|
+
t.text "note"
|
762
|
+
t.integer "position", default: 1, null: false
|
763
|
+
t.datetime "created_at", null: false
|
764
|
+
t.datetime "updated_at", null: false
|
765
|
+
t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true
|
766
|
+
end
|
767
|
+
|
768
|
+
create_table "manifestation_custom_values", force: :cascade do |t|
|
769
|
+
t.integer "manifestation_custom_property_id", null: false
|
770
|
+
t.integer "manifestation_id", null: false
|
771
|
+
t.text "value"
|
772
|
+
t.datetime "created_at", null: false
|
773
|
+
t.datetime "updated_at", null: false
|
774
|
+
t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true
|
775
|
+
t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id"
|
776
|
+
t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id"
|
777
|
+
end
|
778
|
+
|
720
779
|
create_table "manifestation_relationship_types", force: :cascade do |t|
|
721
780
|
t.string "name", null: false
|
722
781
|
t.text "display_name"
|
@@ -804,7 +863,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
804
863
|
t.datetime "valid_until"
|
805
864
|
t.datetime "date_submitted"
|
806
865
|
t.datetime "date_accepted"
|
807
|
-
t.datetime "
|
866
|
+
t.datetime "date_captured"
|
808
867
|
t.string "pub_date"
|
809
868
|
t.string "edition_string"
|
810
869
|
t.integer "volume_number"
|
@@ -820,6 +879,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
820
879
|
t.text "publication_place"
|
821
880
|
t.text "extent"
|
822
881
|
t.text "dimensions"
|
882
|
+
t.text "memo"
|
823
883
|
t.index ["access_address"], name: "index_manifestations_on_access_address"
|
824
884
|
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
825
885
|
t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
|
@@ -934,9 +994,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
934
994
|
create_table "picture_files", force: :cascade do |t|
|
935
995
|
t.integer "picture_attachable_id"
|
936
996
|
t.string "picture_attachable_type"
|
937
|
-
t.string "content_type"
|
938
997
|
t.text "title"
|
939
|
-
t.string "thumbnail"
|
940
998
|
t.integer "position"
|
941
999
|
t.datetime "created_at"
|
942
1000
|
t.datetime "updated_at"
|
@@ -989,6 +1047,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
989
1047
|
t.text "full_name_transcription"
|
990
1048
|
t.datetime "date_of_birth"
|
991
1049
|
t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
|
1050
|
+
t.index ["library_id"], name: "index_profiles_on_library_id"
|
1051
|
+
t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
|
992
1052
|
t.index ["user_id"], name: "index_profiles_on_user_id"
|
993
1053
|
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
994
1054
|
end
|
@@ -1091,7 +1151,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1091
1151
|
t.integer "resource_export_file_id"
|
1092
1152
|
t.datetime "created_at"
|
1093
1153
|
t.datetime "updated_at"
|
1094
|
-
t.boolean "most_recent"
|
1154
|
+
t.boolean "most_recent", null: false
|
1155
|
+
t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1095
1156
|
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
1096
1157
|
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1097
1158
|
end
|
@@ -1114,7 +1175,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1114
1175
|
t.integer "resource_import_file_id"
|
1115
1176
|
t.datetime "created_at"
|
1116
1177
|
t.datetime "updated_at"
|
1117
|
-
t.boolean "most_recent"
|
1178
|
+
t.boolean "most_recent", null: false
|
1179
|
+
t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1118
1180
|
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
1119
1181
|
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1120
1182
|
end
|
@@ -1221,7 +1283,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1221
1283
|
t.string "name", null: false
|
1222
1284
|
t.text "display_name"
|
1223
1285
|
t.text "note"
|
1224
|
-
t.integer "library_id",
|
1286
|
+
t.integer "library_id", null: false
|
1225
1287
|
t.integer "items_count", default: 0, null: false
|
1226
1288
|
t.integer "position"
|
1227
1289
|
t.datetime "created_at"
|
@@ -1336,9 +1398,11 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1336
1398
|
t.integer "user_export_file_id"
|
1337
1399
|
t.datetime "created_at"
|
1338
1400
|
t.datetime "updated_at"
|
1339
|
-
t.boolean "most_recent"
|
1401
|
+
t.boolean "most_recent", null: false
|
1340
1402
|
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1403
|
+
t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1341
1404
|
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1405
|
+
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
1342
1406
|
end
|
1343
1407
|
|
1344
1408
|
create_table "user_export_files", force: :cascade do |t|
|
@@ -1350,6 +1414,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1350
1414
|
t.datetime "executed_at"
|
1351
1415
|
t.datetime "created_at"
|
1352
1416
|
t.datetime "updated_at"
|
1417
|
+
t.index ["user_id"], name: "index_user_export_files_on_user_id"
|
1353
1418
|
end
|
1354
1419
|
|
1355
1420
|
create_table "user_group_has_checkout_types", force: :cascade do |t|
|
@@ -1387,8 +1452,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1387
1452
|
end
|
1388
1453
|
|
1389
1454
|
create_table "user_has_roles", force: :cascade do |t|
|
1390
|
-
t.integer "user_id"
|
1391
|
-
t.integer "role_id"
|
1455
|
+
t.integer "user_id", null: false
|
1456
|
+
t.integer "role_id", null: false
|
1392
1457
|
t.datetime "created_at"
|
1393
1458
|
t.datetime "updated_at"
|
1394
1459
|
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
@@ -1402,8 +1467,9 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1402
1467
|
t.integer "user_import_file_id"
|
1403
1468
|
t.datetime "created_at"
|
1404
1469
|
t.datetime "updated_at"
|
1405
|
-
t.boolean "most_recent"
|
1470
|
+
t.boolean "most_recent", null: false
|
1406
1471
|
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1472
|
+
t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1407
1473
|
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1408
1474
|
end
|
1409
1475
|
|
@@ -1423,6 +1489,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1423
1489
|
t.string "user_encoding"
|
1424
1490
|
t.integer "default_library_id"
|
1425
1491
|
t.integer "default_user_group_id"
|
1492
|
+
t.index ["user_id"], name: "index_user_import_files_on_user_id"
|
1426
1493
|
end
|
1427
1494
|
|
1428
1495
|
create_table "user_import_results", force: :cascade do |t|
|
@@ -1432,6 +1499,8 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1432
1499
|
t.datetime "created_at"
|
1433
1500
|
t.datetime "updated_at"
|
1434
1501
|
t.text "error_message"
|
1502
|
+
t.index ["user_id"], name: "index_user_import_results_on_user_id"
|
1503
|
+
t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1435
1504
|
end
|
1436
1505
|
|
1437
1506
|
create_table "user_reserve_stat_transitions", force: :cascade do |t|
|
@@ -1504,6 +1573,7 @@ ActiveRecord::Schema.define(version: 20171126135238) do
|
|
1504
1573
|
t.datetime "updated_at", null: false
|
1505
1574
|
t.index ["basket_id"], name: "index_withdraws_on_basket_id"
|
1506
1575
|
t.index ["item_id"], name: "index_withdraws_on_item_id"
|
1576
|
+
t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
|
1507
1577
|
end
|
1508
1578
|
|
1509
1579
|
end
|