spec/dummy/db/schema.rb in enju_oai-0.3.0 vs spec/dummy/db/schema.rb in enju_oai-0.3.1

- old
+ new

@@ -8,30 +8,32 @@ # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171126135238) do +ActiveRecord::Schema.define(version: 2020_04_25_074822) do create_table "accepts", force: :cascade do |t| t.integer "basket_id" t.integer "item_id" t.integer "librarian_id" t.datetime "created_at" t.datetime "updated_at" t.index ["basket_id"], name: "index_accepts_on_basket_id" t.index ["item_id"], name: "index_accepts_on_item_id" + t.index ["librarian_id"], name: "index_accepts_on_librarian_id" end create_table "agent_import_file_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" t.integer "agent_import_file_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "most_recent" + t.boolean "most_recent", null: false + t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id" t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true end create_table "agent_import_files", force: :cascade do |t| @@ -151,14 +153,16 @@ t.text "url" t.text "full_name_alternative_transcription" t.string "birth_date" t.string "death_date" t.string "agent_identifier" + t.integer "profile_id" t.index ["agent_identifier"], name: "index_agents_on_agent_identifier" t.index ["country_id"], name: "index_agents_on_country_id" t.index ["full_name"], name: "index_agents_on_full_name" t.index ["language_id"], name: "index_agents_on_language_id" + t.index ["profile_id"], name: "index_agents_on_profile_id" t.index ["required_role_id"], name: "index_agents_on_required_role_id" end create_table "baskets", force: :cascade do |t| t.integer "user_id" @@ -375,10 +379,19 @@ t.integer "create_type_id" t.index ["agent_id"], name: "index_creates_on_agent_id" t.index ["work_id"], name: "index_creates_on_work_id" end + create_table "custom_properties", force: :cascade do |t| + t.integer "resource_id", null: false + t.string "resource_type", null: false + t.text "label", null: false + t.text "value" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "donates", force: :cascade do |t| t.integer "agent_id", null: false t.integer "item_id", null: false t.datetime "created_at" t.datetime "updated_at" @@ -529,11 +542,12 @@ t.text "metadata", default: "{}" t.integer "sort_key" t.integer "import_request_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "most_recent" + t.boolean "most_recent", null: false + t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id" t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true end create_table "import_requests", force: :cascade do |t| @@ -545,10 +559,31 @@ t.index ["isbn"], name: "index_import_requests_on_isbn" t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id" t.index ["user_id"], name: "index_import_requests_on_user_id" end + create_table "item_custom_properties", force: :cascade do |t| + t.string "name", null: false + t.text "display_name", null: false + t.text "note" + t.integer "position", default: 1, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["name"], name: "index_item_custom_properties_on_name", unique: true + end + + create_table "item_custom_values", force: :cascade do |t| + t.integer "item_custom_property_id", null: false + t.integer "item_id", null: false + t.text "value" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true + t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id" + t.index ["item_id"], name: "index_item_custom_values_on_item_id" + end + create_table "item_has_use_restrictions", force: :cascade do |t| t.integer "item_id", null: false t.integer "use_restriction_id", null: false t.datetime "created_at" t.datetime "updated_at" @@ -576,11 +611,12 @@ t.integer "circulation_status_id", default: 5, null: false t.integer "checkout_type_id", default: 1, null: false t.string "binding_item_identifier" t.string "binding_call_number" t.datetime "binded_at" - t.integer "manifestation_id" + t.integer "manifestation_id", null: false + t.text "memo" t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier" t.index ["bookstore_id"], name: "index_items_on_bookstore_id" t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id" t.index ["circulation_status_id"], name: "index_items_on_circulation_status_id" t.index ["item_identifier"], name: "index_items_on_item_identifier" @@ -630,11 +666,11 @@ t.string "telephone_number_2" t.string "fax_number" t.text "note" t.integer "call_number_rows", default: 1, null: false t.string "call_number_delimiter", default: "|", null: false - t.integer "library_group_id", default: 1, null: false + t.integer "library_group_id", null: false t.integer "users_count", default: 0, null: false t.integer "position" t.integer "country_id" t.datetime "created_at" t.datetime "updated_at" @@ -642,11 +678,11 @@ t.text "opening_hour" t.string "isil" t.float "latitude" t.float "longitude" t.index ["library_group_id"], name: "index_libraries_on_library_group_id" - t.index ["name"], name: "index_libraries_on_name", unique: true + t.index ["name"], name: "index_libraries_on_name" end create_table "library_group_translations", force: :cascade do |t| t.integer "library_group_id", null: false t.string "locale", null: false @@ -675,14 +711,16 @@ t.text "html_snippet" t.integer "max_number_of_results", default: 500 t.boolean "family_name_first", default: true t.integer "pub_year_facet_range_interval", default: 10 t.integer "user_id" + t.boolean "csv_charset_conversion", default: false, null: false t.string "header_logo_file_name" t.string "header_logo_content_type" t.integer "header_logo_file_size" t.datetime "header_logo_updated_at" + t.text "header_logo_meta" t.index ["short_name"], name: "index_library_groups_on_short_name" t.index ["user_id"], name: "index_library_groups_on_user_id" end create_table "licenses", force: :cascade do |t| @@ -715,10 +753,31 @@ t.datetime "completed_at" t.integer "user_id" t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id" end + create_table "manifestation_custom_properties", force: :cascade do |t| + t.string "name", null: false + t.text "display_name", null: false + t.text "note" + t.integer "position", default: 1, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true + end + + create_table "manifestation_custom_values", force: :cascade do |t| + t.integer "manifestation_custom_property_id", null: false + t.integer "manifestation_id", null: false + t.text "value" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true + t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id" + t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id" + end + create_table "manifestation_relationship_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" @@ -802,11 +861,11 @@ t.text "abstract" t.datetime "available_at" t.datetime "valid_until" t.datetime "date_submitted" t.datetime "date_accepted" - t.datetime "date_caputured" + t.datetime "date_captured" t.string "pub_date" t.string "edition_string" t.integer "volume_number" t.integer "issue_number" t.integer "serial_number" @@ -818,10 +877,11 @@ t.boolean "serial" t.text "statement_of_responsibility" t.text "publication_place" t.text "extent" t.text "dimensions" + t.text "memo" t.index ["access_address"], name: "index_manifestations_on_access_address" t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication" t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier" t.index ["nii_type_id"], name: "index_manifestations_on_nii_type_id" t.index ["updated_at"], name: "index_manifestations_on_updated_at" @@ -932,13 +992,11 @@ end create_table "picture_files", force: :cascade do |t| t.integer "picture_attachable_id" t.string "picture_attachable_type" - t.string "content_type" t.text "title" - t.string "thumbnail" t.integer "position" t.datetime "created_at" t.datetime "updated_at" t.string "picture_file_name" t.string "picture_content_type" @@ -987,10 +1045,12 @@ t.boolean "save_checkout_history", default: false, null: false t.datetime "expired_at" t.text "full_name_transcription" t.datetime "date_of_birth" t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true + t.index ["library_id"], name: "index_profiles_on_library_id" + t.index ["user_group_id"], name: "index_profiles_on_user_group_id" t.index ["user_id"], name: "index_profiles_on_user_id" t.index ["user_number"], name: "index_profiles_on_user_number", unique: true end create_table "realize_types", force: :cascade do |t| @@ -1089,11 +1149,12 @@ t.text "metadata", default: "{}" t.integer "sort_key" t.integer "resource_export_file_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "most_recent" + t.boolean "most_recent", null: false + t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id" t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true end create_table "resource_export_files", force: :cascade do |t| @@ -1112,11 +1173,12 @@ t.text "metadata", default: "{}" t.integer "sort_key" t.integer "resource_import_file_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "most_recent" + t.boolean "most_recent", null: false + t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id" t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true end create_table "resource_import_files", force: :cascade do |t| @@ -1219,11 +1281,11 @@ create_table "shelves", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" - t.integer "library_id", default: 1, null: false + t.integer "library_id", null: false t.integer "items_count", default: 0, null: false t.integer "position" t.datetime "created_at" t.datetime "updated_at" t.datetime "deleted_at" @@ -1334,13 +1396,15 @@ t.text "metadata", default: "{}" t.integer "sort_key" t.integer "user_export_file_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "most_recent" + t.boolean "most_recent", null: false t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true + t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id" + t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id" end create_table "user_export_files", force: :cascade do |t| t.integer "user_id" t.string "user_export_file_name" @@ -1348,10 +1412,11 @@ t.integer "user_export_file_size" t.datetime "user_export_updated_at" t.datetime "executed_at" t.datetime "created_at" t.datetime "updated_at" + t.index ["user_id"], name: "index_user_export_files_on_user_id" end create_table "user_group_has_checkout_types", force: :cascade do |t| t.integer "user_group_id", null: false t.integer "checkout_type_id", null: false @@ -1385,12 +1450,12 @@ t.integer "number_of_day_to_notify_due_date", default: 7, null: false t.integer "number_of_time_to_notify_overdue", default: 3, null: false end create_table "user_has_roles", force: :cascade do |t| - t.integer "user_id" - t.integer "role_id" + t.integer "user_id", null: false + t.integer "role_id", null: false t.datetime "created_at" t.datetime "updated_at" t.index ["role_id"], name: "index_user_has_roles_on_role_id" t.index ["user_id"], name: "index_user_has_roles_on_user_id" end @@ -1400,12 +1465,13 @@ t.text "metadata", default: "{}" t.integer "sort_key" t.integer "user_import_file_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "most_recent" + t.boolean "most_recent", null: false t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true + t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id" end create_table "user_import_files", force: :cascade do |t| t.integer "user_id" @@ -1421,19 +1487,22 @@ t.datetime "created_at" t.datetime "updated_at" t.string "user_encoding" t.integer "default_library_id" t.integer "default_user_group_id" + t.index ["user_id"], name: "index_user_import_files_on_user_id" end create_table "user_import_results", force: :cascade do |t| t.integer "user_import_file_id" t.integer "user_id" t.text "body" t.datetime "created_at" t.datetime "updated_at" t.text "error_message" + t.index ["user_id"], name: "index_user_import_results_on_user_id" + t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id" end create_table "user_reserve_stat_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" @@ -1502,8 +1571,9 @@ t.integer "librarian_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["basket_id"], name: "index_withdraws_on_basket_id" t.index ["item_id"], name: "index_withdraws_on_item_id" + t.index ["librarian_id"], name: "index_withdraws_on_librarian_id" end end