enju_leaf 1.1.0.beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +24 -0
- data/Rakefile +35 -0
- data/app/assets/images/border.png +0 -0
- data/app/assets/images/controls.png +0 -0
- data/app/assets/images/icons/arrow_divide.png +0 -0
- data/app/assets/images/icons/arrow_down.png +0 -0
- data/app/assets/images/icons/arrow_left.png +0 -0
- data/app/assets/images/icons/arrow_up.png +0 -0
- data/app/assets/images/icons/basket_add.png +0 -0
- data/app/assets/images/icons/book.png +0 -0
- data/app/assets/images/icons/book_edit.png +0 -0
- data/app/assets/images/icons/bullet_go.png +0 -0
- data/app/assets/images/icons/cancel.png +0 -0
- data/app/assets/images/icons/cd.png +0 -0
- data/app/assets/images/icons/comments.png +0 -0
- data/app/assets/images/icons/cross.png +0 -0
- data/app/assets/images/icons/date.png +0 -0
- data/app/assets/images/icons/delete.png +0 -0
- data/app/assets/images/icons/dvd.png +0 -0
- data/app/assets/images/icons/email.png +0 -0
- data/app/assets/images/icons/feed.png +0 -0
- data/app/assets/images/icons/film.png +0 -0
- data/app/assets/images/icons/group.png +0 -0
- data/app/assets/images/icons/help.png +0 -0
- data/app/assets/images/icons/lock.png +0 -0
- data/app/assets/images/icons/map.png +0 -0
- data/app/assets/images/icons/monitor.png +0 -0
- data/app/assets/images/icons/newspaper.png +0 -0
- data/app/assets/images/icons/page_edit.png +0 -0
- data/app/assets/images/icons/page_go.png +0 -0
- data/app/assets/images/icons/page_white_acrobat.png +0 -0
- data/app/assets/images/icons/page_white_cd.png +0 -0
- data/app/assets/images/icons/page_white_delete.png +0 -0
- data/app/assets/images/icons/page_white_dvd.png +0 -0
- data/app/assets/images/icons/page_white_edit.png +0 -0
- data/app/assets/images/icons/page_white_excel.png +0 -0
- data/app/assets/images/icons/page_white_flash.png +0 -0
- data/app/assets/images/icons/page_white_go.png +0 -0
- data/app/assets/images/icons/page_white_picture.png +0 -0
- data/app/assets/images/icons/page_white_powerpoint.png +0 -0
- data/app/assets/images/icons/page_white_text.png +0 -0
- data/app/assets/images/icons/page_white_word.png +0 -0
- data/app/assets/images/icons/page_white_zip.png +0 -0
- data/app/assets/images/icons/picture.png +0 -0
- data/app/assets/images/icons/picture_link.png +0 -0
- data/app/assets/images/icons/sound.png +0 -0
- data/app/assets/images/icons/star.png +0 -0
- data/app/assets/images/icons/stop.png +0 -0
- data/app/assets/images/icons/tag_blue_edit.png +0 -0
- data/app/assets/images/icons/user.png +0 -0
- data/app/assets/images/icons/world.png +0 -0
- data/app/assets/images/icons/world_go.png +0 -0
- data/app/assets/images/ie6/borderBottomCenter.png +0 -0
- data/app/assets/images/ie6/borderBottomLeft.png +0 -0
- data/app/assets/images/ie6/borderBottomRight.png +0 -0
- data/app/assets/images/ie6/borderMiddleLeft.png +0 -0
- data/app/assets/images/ie6/borderMiddleRight.png +0 -0
- data/app/assets/images/ie6/borderTopCenter.png +0 -0
- data/app/assets/images/ie6/borderTopLeft.png +0 -0
- data/app/assets/images/ie6/borderTopRight.png +0 -0
- data/app/assets/images/loading.gif +0 -0
- data/app/assets/images/loading_background.png +0 -0
- data/app/assets/images/overlay.png +0 -0
- data/app/assets/images/rails.png +0 -0
- data/app/assets/images/spinner.gif +0 -0
- data/app/assets/images/unknown_resource.png +0 -0
- data/app/assets/javascripts/enju_leaf.js +16 -0
- data/app/assets/javascripts/menu.enju.js +10 -0
- data/app/assets/javascripts/mobile.js +3 -0
- data/app/assets/javascripts/portlets.js +63 -0
- data/app/assets/javascripts/select_locale.js +9 -0
- data/app/assets/javascripts/tab_view.js +4 -0
- data/app/assets/stylesheets/enju.css +536 -0
- data/app/assets/stylesheets/enju_leaf.css +14 -0
- data/app/assets/stylesheets/enju_mobile.css +3 -0
- data/app/assets/stylesheets/enju_print.css +9 -0
- data/app/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/app/assets/stylesheets/images/border.png +0 -0
- data/app/assets/stylesheets/images/controls.png +0 -0
- data/app/assets/stylesheets/images/icons-18-black.png +0 -0
- data/app/assets/stylesheets/images/icons-18-white.png +0 -0
- data/app/assets/stylesheets/images/icons-36-black.png +0 -0
- data/app/assets/stylesheets/images/icons-36-white.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderBottomCenter.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderBottomLeft.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderBottomRight.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderMiddleLeft.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderMiddleRight.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderTopCenter.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderTopLeft.png +0 -0
- data/app/assets/stylesheets/images/ie6/borderTopRight.png +0 -0
- data/app/assets/stylesheets/images/loading.gif +0 -0
- data/app/assets/stylesheets/images/loading_background.png +0 -0
- data/app/assets/stylesheets/images/overlay.png +0 -0
- data/app/assets/stylesheets/images/spinner_bar.gif +0 -0
- data/app/assets/stylesheets/mobile.css +8 -0
- data/app/assets/stylesheets/pagination.css +92 -0
- data/app/assets/stylesheets/portlets.css +7 -0
- data/app/assets/stylesheets/print.css +7 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/assets/stylesheets/scaffold_modified.css +60 -0
- data/app/assets/stylesheets/scaffolds.css.scss +56 -0
- data/app/controllers/my_accounts_controller.rb +74 -0
- data/app/controllers/page_controller.rb +81 -0
- data/app/controllers/roles_controller.rb +44 -0
- data/app/controllers/user_groups_controller.rb +84 -0
- data/app/controllers/users_controller.rb +195 -0
- data/app/helpers/page_helper.rb +2 -0
- data/app/mailers/notifier.rb +40 -0
- data/app/models/enju_leaf/ability.rb +63 -0
- data/app/models/local_patron.rb +27 -0
- data/app/models/role.rb +46 -0
- data/app/models/setting.rb +4 -0
- data/app/models/user_group.rb +39 -0
- data/app/models/user_has_role.rb +21 -0
- data/app/models/user_sweeper.rb +18 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +24 -0
- data/app/views/devise/passwords/new.html.erb +20 -0
- data/app/views/devise/registrations/edit.html.erb +33 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/sessions/new.html.erb +37 -0
- data/app/views/devise/sessions/new.mobile.erb +29 -0
- data/app/views/devise/shared/_links.erb +19 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/kaminari/_first_page.html.erb +9 -0
- data/app/views/kaminari/_first_page.mobile.erb +12 -0
- data/app/views/kaminari/_gap.html.erb +8 -0
- data/app/views/kaminari/_gap.mobile.erb +10 -0
- data/app/views/kaminari/_last_page.html.erb +9 -0
- data/app/views/kaminari/_last_page.mobile.erb +13 -0
- data/app/views/kaminari/_next_page.html.erb +9 -0
- data/app/views/kaminari/_next_page.mobile.erb +13 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_page.mobile.erb +12 -0
- data/app/views/kaminari/_paginator.html.erb +25 -0
- data/app/views/kaminari/_paginator.mobile.erb +25 -0
- data/app/views/kaminari/_prev_page.html.erb +9 -0
- data/app/views/kaminari/_prev_page.mobile.erb +13 -0
- data/app/views/layouts/application.html.erb +34 -0
- data/app/views/layouts/application.mobile.erb +18 -0
- data/app/views/layouts/devise/passwords.html.erb +21 -0
- data/app/views/layouts/devise/passwords.mobile.erb +18 -0
- data/app/views/layouts/devise/sessions.html.erb +21 -0
- data/app/views/layouts/devise/sessions.mobile.erb +18 -0
- data/app/views/layouts/patrons.html.erb +26 -0
- data/app/views/layouts/patrons.mobile.erb +18 -0
- data/app/views/my_accounts/_edit_credential.html.erb +87 -0
- data/app/views/my_accounts/_form.html.erb +24 -0
- data/app/views/my_accounts/_show.html.erb +1 -0
- data/app/views/my_accounts/edit.html.erb +73 -0
- data/app/views/my_accounts/show.html.erb +72 -0
- data/app/views/my_accounts/show.mobile.erb +1 -0
- data/app/views/notifier/manifestation_info.en.text.erb +18 -0
- data/app/views/notifier/manifestation_info.ja.text.erb +18 -0
- data/app/views/page/403.html.erb +9 -0
- data/app/views/page/403.mobile.erb +5 -0
- data/app/views/page/403.xml.erb +4 -0
- data/app/views/page/404.html.erb +9 -0
- data/app/views/page/404.mobile.erb +5 -0
- data/app/views/page/404.xml.erb +4 -0
- data/app/views/page/500.html.erb +9 -0
- data/app/views/page/500.mobile.erb +5 -0
- data/app/views/page/500.xml.erb +4 -0
- data/app/views/page/_add.html.erb +11 -0
- data/app/views/page/_footer.html.erb +13 -0
- data/app/views/page/_footer.mobile.erb +3 -0
- data/app/views/page/_header.html.erb +34 -0
- data/app/views/page/_include.html.erb +4 -0
- data/app/views/page/_index.html.erb +57 -0
- data/app/views/page/_index.mobile.erb +25 -0
- data/app/views/page/_locale_menu.html.erb +2 -0
- data/app/views/page/_login.html.erb +5 -0
- data/app/views/page/_menu.html.erb +136 -0
- data/app/views/page/_mobile.mobile.erb +3 -0
- data/app/views/page/_msie_acceralator.html.erb +6 -0
- data/app/views/page/_portlets.html.erb +26 -0
- data/app/views/page/_position.html.erb +2 -0
- data/app/views/page/_required_field.html.erb +4 -0
- data/app/views/page/_search_form.html.erb +11 -0
- data/app/views/page/_search_form.mobile.erb +10 -0
- data/app/views/page/_select_locale.html.erb +14 -0
- data/app/views/page/about.en.html.erb +58 -0
- data/app/views/page/about.ja.html.erb +57 -0
- data/app/views/page/add_on.html.erb +13 -0
- data/app/views/page/advanced_search.html.erb +77 -0
- data/app/views/page/configuration.html.erb +113 -0
- data/app/views/page/export.html.erb +31 -0
- data/app/views/page/import.html.erb +19 -0
- data/app/views/page/index.html.erb +5 -0
- data/app/views/page/index.mobile.erb +1 -0
- data/app/views/page/msie_acceralator.builder +15 -0
- data/app/views/page/opensearch.builder +16 -0
- data/app/views/page/statistics.html.erb +105 -0
- data/app/views/roles/_form.html.erb +19 -0
- data/app/views/roles/edit.html.erb +13 -0
- data/app/views/roles/index.html.erb +28 -0
- data/app/views/roles/new.html.erb +12 -0
- data/app/views/roles/show.html.erb +44 -0
- data/app/views/user_groups/_form.html.erb +35 -0
- data/app/views/user_groups/edit.html.erb +13 -0
- data/app/views/user_groups/index.html.erb +41 -0
- data/app/views/user_groups/new.html.erb +12 -0
- data/app/views/user_groups/show.html.erb +64 -0
- data/app/views/users/_edit_credential.html.erb +79 -0
- data/app/views/users/_form.html.erb +24 -0
- data/app/views/users/_show.html.erb +1 -0
- data/app/views/users/edit.html.erb +76 -0
- data/app/views/users/index.html.erb +67 -0
- data/app/views/users/new.html.erb +85 -0
- data/app/views/users/show.html.erb +86 -0
- data/app/views/users/show.mobile.erb +1 -0
- data/config/initializers/mime_types.rb +13 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/locales/devise.ja.yml +55 -0
- data/config/locales/ja.yml +200 -0
- data/config/locales/kaminari.yml +19 -0
- data/config/locales/simple_form.en.yml +25 -0
- data/config/locales/simple_form.ja.yml +27 -0
- data/config/locales/translation_en.yml +423 -0
- data/config/locales/translation_ja.yml +400 -0
- data/config/routes.rb +33 -0
- data/db/fixtures2/bookstores.yml +9 -0
- data/db/fixtures2/carrier_type_has_checkout_types.yml +8 -0
- data/db/fixtures2/carrier_types.yml +29 -0
- data/db/fixtures2/checkout_types.yml +22 -0
- data/db/fixtures2/circulation_statuses.yml +106 -0
- data/db/fixtures2/classification_types.yml +7 -0
- data/db/fixtures2/content_types.yml +22 -0
- data/db/fixtures2/countries.yml +2044 -0
- data/db/fixtures2/create_types.yml +47 -0
- data/db/fixtures2/event_categories.yml +13 -0
- data/db/fixtures2/form_of_works.yml +7 -0
- data/db/fixtures2/frequencies.yml +55 -0
- data/db/fixtures2/languages.yml +1885 -0
- data/db/fixtures2/libraries.yml +25 -0
- data/db/fixtures2/library_groups.yml +10 -0
- data/db/fixtures2/licenses.yml +15 -0
- data/db/fixtures2/manifestation_relationship_types.yml +14 -0
- data/db/fixtures2/message_templates.yml +84 -0
- data/db/fixtures2/patron_relationship_types.yml +20 -0
- data/db/fixtures2/patron_types.yml +16 -0
- data/db/fixtures2/patrons.yml +19 -0
- data/db/fixtures2/produce_types.yml +32 -0
- data/db/fixtures2/realize_types.yml +40 -0
- data/db/fixtures2/request_status_types.yml +37 -0
- data/db/fixtures2/request_types.yml +29 -0
- data/db/fixtures2/roles.yml +29 -0
- data/db/fixtures2/shelves.yml +15 -0
- data/db/fixtures2/subject_types.yml +28 -0
- data/db/fixtures2/use_restrictions.yml +79 -0
- data/db/fixtures2/user_groups.yml +7 -0
- data/db/migrate/041_create_roles.rb +13 -0
- data/db/migrate/077_create_user_groups.rb +12 -0
- data/db/migrate/20091202124834_create_versions.rb +18 -0
- data/db/migrate/20100606065209_create_user_has_roles.rb +12 -0
- data/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
- data/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
- data/db/schema.rb +1896 -0
- data/lib/enju_leaf.rb +294 -0
- data/lib/enju_leaf/controller.rb +24 -0
- data/lib/enju_leaf/engine.rb +16 -0
- data/lib/enju_leaf/helper.rb +116 -0
- data/lib/enju_leaf/user.rb +285 -0
- data/lib/enju_leaf/version.rb +3 -0
- data/lib/generators/enju_leaf/USAGE +8 -0
- data/lib/generators/enju_leaf/quick_install/USAGE +8 -0
- data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +27 -0
- data/lib/generators/enju_leaf/setup/setup_generator.rb +65 -0
- data/lib/generators/enju_leaf/setup/templates/config/application.yml +47 -0
- data/lib/generators/enju_leaf/setup/templates/config/resque.yml +3 -0
- data/lib/generators/enju_leaf/setup/templates/config/schedule.rb +53 -0
- data/lib/generators/enju_leaf/setup/templates/db/fixtures/roles.yml +29 -0
- data/lib/generators/enju_leaf/setup/templates/db/fixtures/user_groups.yml +7 -0
- data/lib/generators/enju_leaf/setup/templates/db/seeds.rb +38 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/admin-extra.html +31 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/elevate.xml +36 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/protwords.txt +21 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/schema.xml +255 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/scripts.conf +24 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/solrconfig.xml +934 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/spellings.txt +2 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/stopwords.txt +58 -0
- data/lib/generators/enju_leaf/setup/templates/solr/conf/synonyms.txt +31 -0
- data/lib/plugins.rb +2 -0
- data/lib/plugins/ext.rb +1 -0
- data/lib/plugins/ext/sunspot.rb +3 -0
- data/lib/plugins/ext/sunspot/abstract_search.rb +12 -0
- data/lib/plugins/ext/sunspot/dismax.rb +41 -0
- data/lib/plugins/ext/sunspot/start_record.rb +55 -0
- data/lib/tasks/enju_leaf_tasks.rake +14 -0
- data/spec/acceptance/acceptance_helper.rb +4 -0
- data/spec/acceptance/support/helpers.rb +6 -0
- data/spec/acceptance/support/paths.rb +9 -0
- data/spec/controllers/my_accounts_controller_spec.rb +199 -0
- data/spec/controllers/page_controller_spec.rb +94 -0
- data/spec/controllers/roles_controller_spec.rb +136 -0
- data/spec/controllers/user_groups_controller_spec.rb +443 -0
- data/spec/controllers/users_controller_spec.rb +549 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +12 -0
- data/spec/dummy/app/helpers/application_helper.rb +3 -0
- data/spec/dummy/app/models/user.rb +8 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +59 -0
- data/spec/dummy/config/application.yml +47 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +205 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +59 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/fixtures/bookstores.yml +9 -0
- data/spec/dummy/db/fixtures/carrier_types.yml +29 -0
- data/spec/dummy/db/fixtures/content_types.yml +22 -0
- data/spec/dummy/db/fixtures/countries.yml +2044 -0
- data/spec/dummy/db/fixtures/create_types.yml +47 -0
- data/spec/dummy/db/fixtures/form_of_works.yml +7 -0
- data/spec/dummy/db/fixtures/frequencies.yml +55 -0
- data/spec/dummy/db/fixtures/languages.yml +1885 -0
- data/spec/dummy/db/fixtures/libraries.yml +25 -0
- data/spec/dummy/db/fixtures/library_groups.yml +10 -0
- data/spec/dummy/db/fixtures/licenses.yml +15 -0
- data/spec/dummy/db/fixtures/manifestation_relationship_types.yml +14 -0
- data/spec/dummy/db/fixtures/patron_relationship_types.yml +20 -0
- data/spec/dummy/db/fixtures/patron_types.yml +16 -0
- data/spec/dummy/db/fixtures/patrons.yml +19 -0
- data/spec/dummy/db/fixtures/produce_types.yml +32 -0
- data/spec/dummy/db/fixtures/realize_types.yml +40 -0
- data/spec/dummy/db/fixtures/request_status_types.yml +37 -0
- data/spec/dummy/db/fixtures/request_types.yml +29 -0
- data/spec/dummy/db/fixtures/roles.yml +29 -0
- data/spec/dummy/db/fixtures/shelves.yml +15 -0
- data/spec/dummy/db/fixtures/user_groups.yml +7 -0
- data/spec/dummy/db/migrate/001_create_patrons.rb +53 -0
- data/spec/dummy/db/migrate/002_devise_create_users.rb +46 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +56 -0
- data/spec/dummy/db/migrate/006_create_items.rb +28 -0
- 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/059_create_libraries.rb +28 -0
- data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +19 -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/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
- data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
- data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
- 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/20081006090811_create_subscriptions.rb +17 -0
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -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/20091214131723_create_series_statements.rb +13 -0
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +15 -0
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
- data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
- 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/20110222073537_add_url_to_library_group.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/20110425133109_add_issn_to_series_statement.rb +9 -0
- data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
- data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.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/20110627034940_create_series_statement_merge_lists.rb +9 -0
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110820131417_create_series_has_manifestations.rb +13 -0
- 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/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
- data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +13 -0
- data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -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/20120105074911_add_isil_to_library.rb +5 -0
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -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/20120319173203_create_accepts.rb +14 -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/20120510140958_add_closed_to_shelf.rb +5 -0
- data/spec/dummy/db/migrate/20120511072422_add_patron_identifier_to_patron.rb +6 -0
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120728204337_create_series_statement_relationships.rb +11 -0
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20121119153944_add_manifestation_id_to_item.rb +5 -0
- data/spec/dummy/db/schema.rb +822 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/solr/conf/admin-extra.html +31 -0
- data/spec/dummy/solr/conf/elevate.xml +36 -0
- data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/spec/dummy/solr/conf/protwords.txt +21 -0
- data/spec/dummy/solr/conf/schema.xml +238 -0
- data/spec/dummy/solr/conf/scripts.conf +24 -0
- data/spec/dummy/solr/conf/solrconfig.xml +934 -0
- data/spec/dummy/solr/conf/spellings.txt +2 -0
- data/spec/dummy/solr/conf/stopwords.txt +58 -0
- data/spec/dummy/solr/conf/synonyms.txt +31 -0
- data/spec/dummy/solr/data/test/index/_3b.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_3b.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_3b.fnm +4 -0
- data/spec/dummy/solr/data/test/index/_3b.frq +1 -0
- data/spec/dummy/solr/data/test/index/_3b.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_3b.prx +0 -0
- data/spec/dummy/solr/data/test/index/_3b.tii +0 -0
- data/spec/dummy/solr/data/test/index/_3b.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_6p +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
- data/spec/factories/basket.rb +5 -0
- data/spec/factories/bookstore.rb +5 -0
- data/spec/factories/carrier_type.rb +5 -0
- data/spec/factories/content_type.rb +5 -0
- data/spec/factories/country.rb +8 -0
- data/spec/factories/create.rb +6 -0
- data/spec/factories/create_types.rb +9 -0
- data/spec/factories/donate.rb +6 -0
- data/spec/factories/exemplify.rb +6 -0
- data/spec/factories/extent.rb +5 -0
- data/spec/factories/import_request.rb +5 -0
- data/spec/factories/item.rb +7 -0
- data/spec/factories/language.rb +8 -0
- data/spec/factories/library.rb +13 -0
- data/spec/factories/license.rb +5 -0
- data/spec/factories/manifestation.rb +6 -0
- data/spec/factories/manifestation_relationship.rb +6 -0
- data/spec/factories/manifestation_relationship_type.rb +5 -0
- data/spec/factories/medium_of_performance.rb +5 -0
- data/spec/factories/own.rb +6 -0
- data/spec/factories/patron.rb +13 -0
- data/spec/factories/patron_relationship.rb +6 -0
- data/spec/factories/patron_relationship_type.rb +5 -0
- data/spec/factories/patron_type.rb +5 -0
- data/spec/factories/produce.rb +6 -0
- data/spec/factories/produce_types.rb +9 -0
- data/spec/factories/realize.rb +6 -0
- data/spec/factories/realize_types.rb +9 -0
- data/spec/factories/series_has_manifestation.rb +6 -0
- data/spec/factories/series_statement.rb +5 -0
- data/spec/factories/shelf.rb +6 -0
- data/spec/factories/subscribe.rb +8 -0
- data/spec/factories/subscription.rb +6 -0
- data/spec/factories/user.rb +59 -0
- data/spec/factories/user_checkout_stat.rb +6 -0
- data/spec/factories/user_group.rb +5 -0
- data/spec/fixtures/baskets.yml +80 -0
- data/spec/fixtures/carrier_types.yml +51 -0
- data/spec/fixtures/content_types.yml +36 -0
- data/spec/fixtures/countries.yml +2059 -0
- data/spec/fixtures/create_types.yml +47 -0
- data/spec/fixtures/creates.yml +66 -0
- data/spec/fixtures/donates.yml +31 -0
- data/spec/fixtures/exemplifies.yml +156 -0
- data/spec/fixtures/extents.yml +29 -0
- data/spec/fixtures/import_requests.yml +27 -0
- data/spec/fixtures/items.yml +262 -0
- data/spec/fixtures/languages.yml +1901 -0
- data/spec/fixtures/libraries.yml +102 -0
- data/spec/fixtures/library_groups.yml +34 -0
- data/spec/fixtures/licenses.yml +29 -0
- data/spec/fixtures/manifestation_relationship_types.yml +29 -0
- data/spec/fixtures/manifestation_relationships.yml +30 -0
- data/spec/fixtures/manifestations.yml +2021 -0
- data/spec/fixtures/medium_of_performances.yml +29 -0
- data/spec/fixtures/owns.yml +27 -0
- data/spec/fixtures/patron_import_files.yml +47 -0
- data/spec/fixtures/patron_import_results.yml +29 -0
- data/spec/fixtures/patron_relationship_types.yml +34 -0
- data/spec/fixtures/patron_relationships.yml +25 -0
- data/spec/fixtures/patron_types.yml +35 -0
- data/spec/fixtures/patrons.yml +338 -0
- data/spec/fixtures/picture_files.yml +64 -0
- data/spec/fixtures/produce_types.yml +31 -0
- data/spec/fixtures/produces.yml +150 -0
- data/spec/fixtures/realize_types.yml +39 -0
- data/spec/fixtures/realizes.yml +87 -0
- data/spec/fixtures/resource_import_files.yml +47 -0
- data/spec/fixtures/resource_import_results.yml +29 -0
- data/spec/fixtures/roles.yml +39 -0
- data/spec/fixtures/series_has_manifestations.yml +35 -0
- data/spec/fixtures/series_statements.yml +45 -0
- data/spec/fixtures/shelves.yml +47 -0
- data/spec/fixtures/subscribes.yml +45 -0
- data/spec/fixtures/subscriptions.yml +27 -0
- data/spec/fixtures/user_groups.yml +50 -0
- data/spec/fixtures/user_has_roles.yml +40 -0
- data/spec/fixtures/users.yml +151 -0
- data/spec/fixtures_old/inventory_files.yml +40 -0
- data/spec/models/basket_spec.rb +23 -0
- data/spec/models/role_spec.rb +40 -0
- data/spec/models/user_group_spec.rb +26 -0
- data/spec/models/user_has_role_spec.rb +18 -0
- data/spec/models/user_spec.rb +218 -0
- data/spec/requests/users_spec.rb +9 -0
- data/spec/routing/accounts_spec.rb +14 -0
- data/spec/routing/roles_routing_spec.rb +35 -0
- data/spec/routing/users_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +51 -0
- data/spec/support/controller_macros.rb +46 -0
- data/spec/support/devise.rb +4 -0
- data/spec/views/users/edit.html.erb_spec.rb +25 -0
- data/spec/views/users/index.html.erb_spec.rb +16 -0
- data/spec/views/users/new.html.erb_spec.rb +25 -0
- data/spec/views/users/show.html.erb_spec.rb +15 -0
- data/vendor/assets/javascripts/event_calendar.js +37 -0
- data/vendor/assets/javascripts/jquery.colorbox.js +1025 -0
- data/vendor/assets/javascripts/jquery.cookie.js +94 -0
- data/vendor/assets/javascripts/jquery.highlight.js +108 -0
- data/vendor/assets/javascripts/jquery.mobile-1.3.0.js +11092 -0
- data/vendor/assets/javascripts/jquery.powertip.js +796 -0
- data/vendor/assets/javascripts/jquery.shortcut.js +241 -0
- data/vendor/assets/javascripts/jquery.ui.menubar.js +327 -0
- data/vendor/assets/stylesheets/acts_as_taggable_stylesheet.css +7 -0
- data/vendor/assets/stylesheets/colorbox.css +93 -0
- data/vendor/assets/stylesheets/event_calendar.css +237 -0
- data/vendor/assets/stylesheets/html5-doctor-reset-stylesheet.min.css +14 -0
- data/vendor/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/vendor/assets/stylesheets/images/border.png +0 -0
- data/vendor/assets/stylesheets/images/controls.png +0 -0
- data/vendor/assets/stylesheets/images/icons-18-black.png +0 -0
- data/vendor/assets/stylesheets/images/icons-18-white.png +0 -0
- data/vendor/assets/stylesheets/images/icons-36-black.png +0 -0
- data/vendor/assets/stylesheets/images/icons-36-white.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderBottomCenter.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderBottomLeft.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderBottomRight.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderMiddleLeft.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderMiddleRight.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderTopCenter.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderTopLeft.png +0 -0
- data/vendor/assets/stylesheets/images/ie6/borderTopRight.png +0 -0
- data/vendor/assets/stylesheets/images/loading.gif +0 -0
- data/vendor/assets/stylesheets/images/loading_background.png +0 -0
- data/vendor/assets/stylesheets/images/overlay.png +0 -0
- data/vendor/assets/stylesheets/images/spinner_bar.gif +0 -0
- data/vendor/assets/stylesheets/jquery.mobile-1.3.0.css +3357 -0
- data/vendor/assets/stylesheets/jquery.powertip.css +64 -0
- data/vendor/assets/stylesheets/jquery.ui.menubar.css +15 -0
- metadata +1153 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class CreateRoles < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table "roles" do |t|
|
|
4
|
+
t.column :name, :string, :null => false
|
|
5
|
+
t.column :display_name, :string
|
|
6
|
+
t.column :note, :text
|
|
7
|
+
t.column :created_at, :datetime
|
|
8
|
+
t.column :updated_at, :datetime
|
|
9
|
+
t.integer :score, :default => 0, :null => false
|
|
10
|
+
t.integer :position
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
class CreateVersions < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
create_table :versions do |t|
|
|
4
|
+
t.string :item_type, :null => false
|
|
5
|
+
t.integer :item_id, :null => false
|
|
6
|
+
t.string :event, :null => false
|
|
7
|
+
t.string :whodunnit
|
|
8
|
+
t.text :object
|
|
9
|
+
t.datetime :created_at
|
|
10
|
+
end
|
|
11
|
+
add_index :versions, [:item_type, :item_id]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.down
|
|
15
|
+
remove_index :versions, [:item_type, :item_id]
|
|
16
|
+
drop_table :versions
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
class CreateUserHasRoles < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :user_has_roles do |t|
|
|
4
|
+
t.integer :user_id
|
|
5
|
+
t.integer :role_id
|
|
6
|
+
|
|
7
|
+
t.timestamps
|
|
8
|
+
end
|
|
9
|
+
add_index :user_has_roles, :user_id
|
|
10
|
+
add_index :user_has_roles, :role_id
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration
|
|
2
|
+
def self.up
|
|
3
|
+
add_column :user_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
|
4
|
+
add_column :user_groups, :expired_at, :timestamp
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def self.down
|
|
8
|
+
remove_column :user_groups, :valid_period_for_new_user
|
|
9
|
+
remove_column :user_groups, :expired_at
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
class AddAdditionalAttributesToUser < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
add_column :users, :username, :string
|
|
4
|
+
add_column :users, :user_number, :string
|
|
5
|
+
add_column :users, :state, :string
|
|
6
|
+
add_column :users, :locale, :string
|
|
7
|
+
add_column :users, :deleted_at, :datetime
|
|
8
|
+
add_column :users, :expired_at, :datetime
|
|
9
|
+
add_column :users, :library_id, :integer, :default => 1, :null => false
|
|
10
|
+
add_column :users, :required_role_id, :integer, :default => 1, :null => false
|
|
11
|
+
add_column :users, :user_group_id, :integer, :default => 1, :null => false
|
|
12
|
+
add_column :users, :note, :text
|
|
13
|
+
add_column :users, :keyword_list, :text
|
|
14
|
+
|
|
15
|
+
add_column :users, :failed_attempts, :integer
|
|
16
|
+
add_column :users, :unlock_token, :string
|
|
17
|
+
add_column :users, :locked_at, :datetime
|
|
18
|
+
|
|
19
|
+
add_column :users, :confirmed_at, :datetime
|
|
20
|
+
|
|
21
|
+
add_index :users, :username, :unique => true
|
|
22
|
+
add_index :users, :user_group_id
|
|
23
|
+
add_index :users, :user_number, :unique => true
|
|
24
|
+
add_index :users, :unlock_token, :unique => true
|
|
25
|
+
end
|
|
26
|
+
end
|
data/db/schema.rb
ADDED
|
@@ -0,0 +1,1896 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
5
|
+
#
|
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
|
7
|
+
# database schema. If you need to create the application database on another
|
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
|
+
#
|
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
|
13
|
+
|
|
14
|
+
ActiveRecord::Schema.define(:version => 20130404100259) do
|
|
15
|
+
|
|
16
|
+
create_table "accepts", :force => true do |t|
|
|
17
|
+
t.integer "basket_id"
|
|
18
|
+
t.integer "item_id"
|
|
19
|
+
t.integer "librarian_id"
|
|
20
|
+
t.datetime "created_at", :null => false
|
|
21
|
+
t.datetime "updated_at", :null => false
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
add_index "accepts", ["basket_id"], :name => "index_accepts_on_basket_id"
|
|
25
|
+
add_index "accepts", ["item_id"], :name => "index_accepts_on_item_id"
|
|
26
|
+
|
|
27
|
+
create_table "answer_has_items", :force => true do |t|
|
|
28
|
+
t.integer "answer_id"
|
|
29
|
+
t.integer "item_id"
|
|
30
|
+
t.integer "position"
|
|
31
|
+
t.datetime "created_at"
|
|
32
|
+
t.datetime "updated_at"
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
add_index "answer_has_items", ["answer_id"], :name => "index_answer_has_items_on_answer_id"
|
|
36
|
+
add_index "answer_has_items", ["item_id"], :name => "index_answer_has_items_on_item_id"
|
|
37
|
+
|
|
38
|
+
create_table "answers", :force => true do |t|
|
|
39
|
+
t.integer "user_id", :null => false
|
|
40
|
+
t.integer "question_id", :null => false
|
|
41
|
+
t.text "body"
|
|
42
|
+
t.datetime "created_at"
|
|
43
|
+
t.datetime "updated_at"
|
|
44
|
+
t.datetime "deleted_at"
|
|
45
|
+
t.string "state"
|
|
46
|
+
t.text "item_identifier_list"
|
|
47
|
+
t.text "url_list"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
add_index "answers", ["question_id"], :name => "index_answers_on_question_id"
|
|
51
|
+
add_index "answers", ["user_id"], :name => "index_answers_on_user_id"
|
|
52
|
+
|
|
53
|
+
create_table "barcode_lists", :force => true do |t|
|
|
54
|
+
t.string "barcode_name"
|
|
55
|
+
t.string "usage_type"
|
|
56
|
+
t.string "barcode_type"
|
|
57
|
+
t.string "barcode_prefix"
|
|
58
|
+
t.integer "printed_number"
|
|
59
|
+
t.integer "sheet_type"
|
|
60
|
+
t.integer "last_number"
|
|
61
|
+
t.datetime "created_at"
|
|
62
|
+
t.datetime "updated_at"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
create_table "barcodes", :force => true do |t|
|
|
66
|
+
t.string "barcode_type", :default => "Code128B", :null => false
|
|
67
|
+
t.integer "barcodable_id"
|
|
68
|
+
t.string "barcodable_type"
|
|
69
|
+
t.string "code_word"
|
|
70
|
+
t.binary "data"
|
|
71
|
+
t.datetime "created_at"
|
|
72
|
+
t.datetime "updated_at"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
add_index "barcodes", ["barcodable_id", "barcodable_type"], :name => "index_barcodes_on_barcodable_id_and_barcodable_type"
|
|
76
|
+
add_index "barcodes", ["barcode_type", "code_word"], :name => "index_barcodes_on_barcode_type_and_code_word"
|
|
77
|
+
|
|
78
|
+
create_table "baskets", :force => true do |t|
|
|
79
|
+
t.integer "user_id"
|
|
80
|
+
t.text "note"
|
|
81
|
+
t.string "type"
|
|
82
|
+
t.integer "lock_version", :default => 0, :null => false
|
|
83
|
+
t.datetime "created_at"
|
|
84
|
+
t.datetime "updated_at"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
add_index "baskets", ["type"], :name => "index_baskets_on_type"
|
|
88
|
+
add_index "baskets", ["user_id"], :name => "index_baskets_on_user_id"
|
|
89
|
+
|
|
90
|
+
create_table "bookmark_stat_has_manifestations", :force => true do |t|
|
|
91
|
+
t.integer "bookmark_stat_id", :null => false
|
|
92
|
+
t.integer "manifestation_id", :null => false
|
|
93
|
+
t.integer "bookmarks_count"
|
|
94
|
+
t.datetime "created_at"
|
|
95
|
+
t.datetime "updated_at"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
add_index "bookmark_stat_has_manifestations", ["bookmark_stat_id"], :name => "index_bookmark_stat_has_manifestations_on_bookmark_stat_id"
|
|
99
|
+
add_index "bookmark_stat_has_manifestations", ["manifestation_id"], :name => "index_bookmark_stat_has_manifestations_on_manifestation_id"
|
|
100
|
+
|
|
101
|
+
create_table "bookmark_stats", :force => true do |t|
|
|
102
|
+
t.datetime "start_date"
|
|
103
|
+
t.datetime "end_date"
|
|
104
|
+
t.text "note"
|
|
105
|
+
t.string "state"
|
|
106
|
+
t.datetime "created_at"
|
|
107
|
+
t.datetime "updated_at"
|
|
108
|
+
t.datetime "started_at"
|
|
109
|
+
t.datetime "completed_at"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
add_index "bookmark_stats", ["state"], :name => "index_bookmark_stats_on_state"
|
|
113
|
+
|
|
114
|
+
create_table "bookmarks", :force => true do |t|
|
|
115
|
+
t.integer "user_id", :null => false
|
|
116
|
+
t.integer "manifestation_id"
|
|
117
|
+
t.text "title"
|
|
118
|
+
t.string "url"
|
|
119
|
+
t.text "note"
|
|
120
|
+
t.datetime "created_at"
|
|
121
|
+
t.datetime "updated_at"
|
|
122
|
+
t.boolean "shared"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
add_index "bookmarks", ["manifestation_id"], :name => "index_bookmarks_on_manifestation_id"
|
|
126
|
+
add_index "bookmarks", ["url"], :name => "index_bookmarks_on_url"
|
|
127
|
+
add_index "bookmarks", ["user_id"], :name => "index_bookmarks_on_user_id"
|
|
128
|
+
|
|
129
|
+
create_table "bookstores", :force => true do |t|
|
|
130
|
+
t.text "name", :null => false
|
|
131
|
+
t.string "zip_code"
|
|
132
|
+
t.text "address"
|
|
133
|
+
t.text "note"
|
|
134
|
+
t.string "telephone_number"
|
|
135
|
+
t.string "fax_number"
|
|
136
|
+
t.string "url"
|
|
137
|
+
t.integer "position"
|
|
138
|
+
t.datetime "deleted_at"
|
|
139
|
+
t.datetime "created_at"
|
|
140
|
+
t.datetime "updated_at"
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
create_table "budget_types", :force => true do |t|
|
|
144
|
+
t.string "name"
|
|
145
|
+
t.text "display_name"
|
|
146
|
+
t.text "note"
|
|
147
|
+
t.integer "position"
|
|
148
|
+
t.datetime "created_at", :null => false
|
|
149
|
+
t.datetime "updated_at", :null => false
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
create_table "buildings", :force => true do |t|
|
|
153
|
+
t.string "name"
|
|
154
|
+
t.text "display_name"
|
|
155
|
+
t.text "note"
|
|
156
|
+
t.integer "position"
|
|
157
|
+
t.datetime "created_at", :null => false
|
|
158
|
+
t.datetime "updated_at", :null => false
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
create_table "carrier_type_has_checkout_types", :force => true do |t|
|
|
162
|
+
t.integer "carrier_type_id", :null => false
|
|
163
|
+
t.integer "checkout_type_id", :null => false
|
|
164
|
+
t.text "note"
|
|
165
|
+
t.integer "position"
|
|
166
|
+
t.datetime "created_at"
|
|
167
|
+
t.datetime "updated_at"
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
add_index "carrier_type_has_checkout_types", ["carrier_type_id"], :name => "index_carrier_type_has_checkout_types_on_m_form_id"
|
|
171
|
+
add_index "carrier_type_has_checkout_types", ["checkout_type_id"], :name => "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
|
172
|
+
|
|
173
|
+
create_table "carrier_types", :force => true do |t|
|
|
174
|
+
t.string "name", :null => false
|
|
175
|
+
t.text "display_name"
|
|
176
|
+
t.text "note"
|
|
177
|
+
t.integer "position"
|
|
178
|
+
t.datetime "created_at"
|
|
179
|
+
t.datetime "updated_at"
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
create_table "checked_items", :force => true do |t|
|
|
183
|
+
t.integer "item_id", :null => false
|
|
184
|
+
t.integer "basket_id", :null => false
|
|
185
|
+
t.datetime "due_date", :null => false
|
|
186
|
+
t.datetime "created_at"
|
|
187
|
+
t.datetime "updated_at"
|
|
188
|
+
t.integer "librarian_id"
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
add_index "checked_items", ["basket_id"], :name => "index_checked_items_on_basket_id"
|
|
192
|
+
add_index "checked_items", ["item_id"], :name => "index_checked_items_on_item_id"
|
|
193
|
+
|
|
194
|
+
create_table "checkins", :force => true do |t|
|
|
195
|
+
t.integer "item_id", :null => false
|
|
196
|
+
t.integer "librarian_id"
|
|
197
|
+
t.integer "basket_id"
|
|
198
|
+
t.datetime "created_at"
|
|
199
|
+
t.datetime "updated_at"
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
add_index "checkins", ["basket_id"], :name => "index_checkins_on_basket_id"
|
|
203
|
+
add_index "checkins", ["item_id"], :name => "index_checkins_on_item_id"
|
|
204
|
+
add_index "checkins", ["librarian_id"], :name => "index_checkins_on_librarian_id"
|
|
205
|
+
|
|
206
|
+
create_table "checkout_stat_has_manifestations", :force => true do |t|
|
|
207
|
+
t.integer "manifestation_checkout_stat_id", :null => false
|
|
208
|
+
t.integer "manifestation_id", :null => false
|
|
209
|
+
t.integer "checkouts_count"
|
|
210
|
+
t.datetime "created_at"
|
|
211
|
+
t.datetime "updated_at"
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
add_index "checkout_stat_has_manifestations", ["manifestation_checkout_stat_id"], :name => "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
|
215
|
+
add_index "checkout_stat_has_manifestations", ["manifestation_id"], :name => "index_checkout_stat_has_manifestations_on_manifestation_id"
|
|
216
|
+
|
|
217
|
+
create_table "checkout_stat_has_users", :force => true do |t|
|
|
218
|
+
t.integer "user_checkout_stat_id", :null => false
|
|
219
|
+
t.integer "user_id", :null => false
|
|
220
|
+
t.integer "checkouts_count", :default => 0, :null => false
|
|
221
|
+
t.datetime "created_at"
|
|
222
|
+
t.datetime "updated_at"
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
add_index "checkout_stat_has_users", ["user_checkout_stat_id"], :name => "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
|
226
|
+
add_index "checkout_stat_has_users", ["user_id"], :name => "index_checkout_stat_has_users_on_user_id"
|
|
227
|
+
|
|
228
|
+
create_table "checkout_types", :force => true do |t|
|
|
229
|
+
t.string "name", :null => false
|
|
230
|
+
t.text "display_name"
|
|
231
|
+
t.text "note"
|
|
232
|
+
t.integer "position"
|
|
233
|
+
t.datetime "created_at"
|
|
234
|
+
t.datetime "updated_at"
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
add_index "checkout_types", ["name"], :name => "index_checkout_types_on_name"
|
|
238
|
+
|
|
239
|
+
create_table "checkouts", :force => true do |t|
|
|
240
|
+
t.integer "user_id"
|
|
241
|
+
t.integer "item_id", :null => false
|
|
242
|
+
t.integer "checkin_id"
|
|
243
|
+
t.integer "librarian_id"
|
|
244
|
+
t.integer "basket_id"
|
|
245
|
+
t.datetime "due_date"
|
|
246
|
+
t.integer "checkout_renewal_count", :default => 0, :null => false
|
|
247
|
+
t.integer "lock_version", :default => 0, :null => false
|
|
248
|
+
t.datetime "created_at"
|
|
249
|
+
t.datetime "updated_at"
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
add_index "checkouts", ["basket_id"], :name => "index_checkouts_on_basket_id"
|
|
253
|
+
add_index "checkouts", ["checkin_id"], :name => "index_checkouts_on_checkin_id"
|
|
254
|
+
add_index "checkouts", ["item_id", "basket_id"], :name => "index_checkouts_on_item_id_and_basket_id", :unique => true
|
|
255
|
+
add_index "checkouts", ["item_id"], :name => "index_checkouts_on_item_id"
|
|
256
|
+
add_index "checkouts", ["librarian_id"], :name => "index_checkouts_on_librarian_id"
|
|
257
|
+
add_index "checkouts", ["user_id"], :name => "index_checkouts_on_user_id"
|
|
258
|
+
|
|
259
|
+
create_table "circulation_statuses", :force => true do |t|
|
|
260
|
+
t.string "name", :null => false
|
|
261
|
+
t.text "display_name"
|
|
262
|
+
t.text "note"
|
|
263
|
+
t.integer "position"
|
|
264
|
+
t.datetime "created_at"
|
|
265
|
+
t.datetime "updated_at"
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
create_table "classification_types", :force => true do |t|
|
|
269
|
+
t.string "name", :null => false
|
|
270
|
+
t.text "display_name"
|
|
271
|
+
t.text "note"
|
|
272
|
+
t.integer "position"
|
|
273
|
+
t.datetime "created_at"
|
|
274
|
+
t.datetime "updated_at"
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
create_table "classifications", :force => true do |t|
|
|
278
|
+
t.integer "parent_id"
|
|
279
|
+
t.string "category", :null => false
|
|
280
|
+
t.text "note"
|
|
281
|
+
t.integer "classification_type_id", :null => false
|
|
282
|
+
t.datetime "created_at"
|
|
283
|
+
t.datetime "updated_at"
|
|
284
|
+
t.integer "lft"
|
|
285
|
+
t.integer "rgt"
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
add_index "classifications", ["category"], :name => "index_classifications_on_category"
|
|
289
|
+
add_index "classifications", ["classification_type_id"], :name => "index_classifications_on_classification_type_id"
|
|
290
|
+
add_index "classifications", ["parent_id"], :name => "index_classifications_on_parent_id"
|
|
291
|
+
|
|
292
|
+
create_table "content_types", :force => true do |t|
|
|
293
|
+
t.string "name", :null => false
|
|
294
|
+
t.text "display_name"
|
|
295
|
+
t.text "note"
|
|
296
|
+
t.integer "position"
|
|
297
|
+
t.datetime "created_at"
|
|
298
|
+
t.datetime "updated_at"
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
create_table "countries", :force => true do |t|
|
|
302
|
+
t.string "name", :null => false
|
|
303
|
+
t.text "display_name"
|
|
304
|
+
t.string "alpha_2"
|
|
305
|
+
t.string "alpha_3"
|
|
306
|
+
t.string "numeric_3"
|
|
307
|
+
t.text "note"
|
|
308
|
+
t.integer "position"
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
add_index "countries", ["alpha_2"], :name => "index_countries_on_alpha_2"
|
|
312
|
+
add_index "countries", ["alpha_3"], :name => "index_countries_on_alpha_3"
|
|
313
|
+
add_index "countries", ["name"], :name => "index_countries_on_name"
|
|
314
|
+
add_index "countries", ["numeric_3"], :name => "index_countries_on_numeric_3"
|
|
315
|
+
|
|
316
|
+
create_table "create_types", :force => true do |t|
|
|
317
|
+
t.string "name"
|
|
318
|
+
t.text "display_name"
|
|
319
|
+
t.text "note"
|
|
320
|
+
t.integer "position"
|
|
321
|
+
t.datetime "created_at"
|
|
322
|
+
t.datetime "updated_at"
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
create_table "creates", :force => true do |t|
|
|
326
|
+
t.integer "patron_id", :null => false
|
|
327
|
+
t.integer "work_id", :null => false
|
|
328
|
+
t.integer "position"
|
|
329
|
+
t.string "type"
|
|
330
|
+
t.datetime "created_at"
|
|
331
|
+
t.datetime "updated_at"
|
|
332
|
+
t.integer "create_type_id"
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
add_index "creates", ["patron_id"], :name => "index_creates_on_patron_id"
|
|
336
|
+
add_index "creates", ["type"], :name => "index_creates_on_type"
|
|
337
|
+
add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
|
|
338
|
+
|
|
339
|
+
create_table "delayed_jobs", :force => true do |t|
|
|
340
|
+
t.integer "priority", :default => 0
|
|
341
|
+
t.integer "attempts", :default => 0
|
|
342
|
+
t.text "handler"
|
|
343
|
+
t.text "last_error"
|
|
344
|
+
t.datetime "run_at"
|
|
345
|
+
t.datetime "locked_at"
|
|
346
|
+
t.datetime "failed_at"
|
|
347
|
+
t.string "locked_by"
|
|
348
|
+
t.datetime "created_at"
|
|
349
|
+
t.datetime "updated_at"
|
|
350
|
+
t.string "queue"
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
|
354
|
+
|
|
355
|
+
create_table "donates", :force => true do |t|
|
|
356
|
+
t.integer "patron_id", :null => false
|
|
357
|
+
t.integer "item_id", :null => false
|
|
358
|
+
t.datetime "created_at"
|
|
359
|
+
t.datetime "updated_at"
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
|
|
363
|
+
add_index "donates", ["patron_id"], :name => "index_donates_on_patron_id"
|
|
364
|
+
|
|
365
|
+
create_table "employee_types", :force => true do |t|
|
|
366
|
+
t.string "name"
|
|
367
|
+
t.text "display_name"
|
|
368
|
+
t.text "note"
|
|
369
|
+
t.integer "position"
|
|
370
|
+
t.datetime "created_at", :null => false
|
|
371
|
+
t.datetime "updated_at", :null => false
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
create_table "event_categories", :force => true do |t|
|
|
375
|
+
t.string "name", :null => false
|
|
376
|
+
t.text "display_name"
|
|
377
|
+
t.text "note"
|
|
378
|
+
t.integer "position"
|
|
379
|
+
t.datetime "created_at"
|
|
380
|
+
t.datetime "updated_at"
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
create_table "event_import_files", :force => true do |t|
|
|
384
|
+
t.integer "parent_id"
|
|
385
|
+
t.string "content_type"
|
|
386
|
+
t.integer "size"
|
|
387
|
+
t.string "file_hash"
|
|
388
|
+
t.integer "user_id"
|
|
389
|
+
t.text "note"
|
|
390
|
+
t.string "state"
|
|
391
|
+
t.string "event_import_file_name"
|
|
392
|
+
t.string "event_import_content_type"
|
|
393
|
+
t.integer "event_import_file_size"
|
|
394
|
+
t.datetime "event_import_updated_at"
|
|
395
|
+
t.datetime "created_at"
|
|
396
|
+
t.datetime "updated_at"
|
|
397
|
+
t.string "edit_mode"
|
|
398
|
+
t.string "event_import_fingerprint"
|
|
399
|
+
t.datetime "executed_at"
|
|
400
|
+
t.text "error_message"
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
add_index "event_import_files", ["file_hash"], :name => "index_event_import_files_on_file_hash"
|
|
404
|
+
add_index "event_import_files", ["parent_id"], :name => "index_event_import_files_on_parent_id"
|
|
405
|
+
add_index "event_import_files", ["state"], :name => "index_event_import_files_on_state"
|
|
406
|
+
add_index "event_import_files", ["user_id"], :name => "index_event_import_files_on_user_id"
|
|
407
|
+
|
|
408
|
+
create_table "event_import_results", :force => true do |t|
|
|
409
|
+
t.integer "event_import_file_id"
|
|
410
|
+
t.integer "event_id"
|
|
411
|
+
t.text "body"
|
|
412
|
+
t.datetime "created_at"
|
|
413
|
+
t.datetime "updated_at"
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
create_table "events", :force => true do |t|
|
|
417
|
+
t.integer "library_id", :default => 1, :null => false
|
|
418
|
+
t.integer "event_category_id", :default => 1, :null => false
|
|
419
|
+
t.string "name"
|
|
420
|
+
t.text "note"
|
|
421
|
+
t.datetime "start_at"
|
|
422
|
+
t.datetime "end_at"
|
|
423
|
+
t.boolean "all_day", :default => false, :null => false
|
|
424
|
+
t.datetime "deleted_at"
|
|
425
|
+
t.datetime "created_at"
|
|
426
|
+
t.datetime "updated_at"
|
|
427
|
+
t.text "display_name"
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
add_index "events", ["event_category_id"], :name => "index_events_on_event_category_id"
|
|
431
|
+
add_index "events", ["library_id"], :name => "index_events_on_library_id"
|
|
432
|
+
|
|
433
|
+
create_table "exemplifies", :force => true do |t|
|
|
434
|
+
t.integer "manifestation_id", :null => false
|
|
435
|
+
t.integer "item_id", :null => false
|
|
436
|
+
t.string "type"
|
|
437
|
+
t.integer "position"
|
|
438
|
+
t.datetime "created_at"
|
|
439
|
+
t.datetime "updated_at"
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
add_index "exemplifies", ["item_id"], :name => "index_exemplifies_on_item_id", :unique => true
|
|
443
|
+
add_index "exemplifies", ["manifestation_id"], :name => "index_exemplifies_on_manifestation_id"
|
|
444
|
+
add_index "exemplifies", ["type"], :name => "index_exemplifies_on_type"
|
|
445
|
+
|
|
446
|
+
create_table "export_files", :force => true do |t|
|
|
447
|
+
t.string "export_file_name"
|
|
448
|
+
t.string "export_content_type"
|
|
449
|
+
t.string "export_file_size"
|
|
450
|
+
t.string "state"
|
|
451
|
+
t.datetime "created_at", :null => false
|
|
452
|
+
t.datetime "updated_at", :null => false
|
|
453
|
+
t.integer "user_id"
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
add_index "export_files", ["user_id"], :name => "index_export_files_on_user_id"
|
|
457
|
+
|
|
458
|
+
create_table "expression_merge_lists", :force => true do |t|
|
|
459
|
+
t.string "title"
|
|
460
|
+
t.datetime "created_at"
|
|
461
|
+
t.datetime "updated_at"
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
create_table "expression_merges", :force => true do |t|
|
|
465
|
+
t.integer "expression_id", :null => false
|
|
466
|
+
t.integer "expression_merge_list_id", :null => false
|
|
467
|
+
t.datetime "created_at"
|
|
468
|
+
t.datetime "updated_at"
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
add_index "expression_merges", ["expression_id"], :name => "index_expression_merges_on_expression_id"
|
|
472
|
+
add_index "expression_merges", ["expression_merge_list_id"], :name => "index_expression_merges_on_expression_merge_list_id"
|
|
473
|
+
|
|
474
|
+
create_table "extents", :force => true do |t|
|
|
475
|
+
t.string "name", :null => false
|
|
476
|
+
t.text "display_name"
|
|
477
|
+
t.text "note"
|
|
478
|
+
t.integer "position"
|
|
479
|
+
t.datetime "created_at"
|
|
480
|
+
t.datetime "updated_at"
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
create_table "form_of_works", :force => true do |t|
|
|
484
|
+
t.string "name", :null => false
|
|
485
|
+
t.text "display_name"
|
|
486
|
+
t.text "note"
|
|
487
|
+
t.integer "position"
|
|
488
|
+
t.datetime "created_at"
|
|
489
|
+
t.datetime "updated_at"
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
create_table "frequencies", :force => true do |t|
|
|
493
|
+
t.string "name", :null => false
|
|
494
|
+
t.text "display_name"
|
|
495
|
+
t.text "note"
|
|
496
|
+
t.integer "position"
|
|
497
|
+
t.datetime "created_at"
|
|
498
|
+
t.datetime "updated_at"
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
create_table "import_requests", :force => true do |t|
|
|
502
|
+
t.string "isbn"
|
|
503
|
+
t.string "state"
|
|
504
|
+
t.integer "manifestation_id"
|
|
505
|
+
t.integer "user_id"
|
|
506
|
+
t.datetime "created_at"
|
|
507
|
+
t.datetime "updated_at"
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
add_index "import_requests", ["isbn"], :name => "index_import_requests_on_isbn"
|
|
511
|
+
add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
|
|
512
|
+
add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
|
|
513
|
+
|
|
514
|
+
create_table "imported_objects", :force => true do |t|
|
|
515
|
+
t.integer "imported_file_id"
|
|
516
|
+
t.string "imported_file_type"
|
|
517
|
+
t.integer "importable_id"
|
|
518
|
+
t.string "importable_type"
|
|
519
|
+
t.string "state"
|
|
520
|
+
t.integer "line_number"
|
|
521
|
+
t.datetime "created_at"
|
|
522
|
+
t.datetime "updated_at"
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
add_index "imported_objects", ["importable_id", "importable_type"], :name => "index_imported_objects_on_importable_id_and_type"
|
|
526
|
+
add_index "imported_objects", ["imported_file_id", "imported_file_type"], :name => "index_imported_objects_on_imported_file_id_and_type"
|
|
527
|
+
|
|
528
|
+
create_table "inter_library_loans", :force => true do |t|
|
|
529
|
+
t.integer "item_id", :null => false
|
|
530
|
+
t.integer "borrowing_library_id", :null => false
|
|
531
|
+
t.datetime "requested_at"
|
|
532
|
+
t.datetime "shipped_at"
|
|
533
|
+
t.datetime "received_at"
|
|
534
|
+
t.datetime "return_shipped_at"
|
|
535
|
+
t.datetime "return_received_at"
|
|
536
|
+
t.datetime "deleted_at"
|
|
537
|
+
t.string "state"
|
|
538
|
+
t.datetime "created_at"
|
|
539
|
+
t.datetime "updated_at"
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
add_index "inter_library_loans", ["borrowing_library_id"], :name => "index_inter_library_loans_on_borrowing_library_id"
|
|
543
|
+
add_index "inter_library_loans", ["item_id"], :name => "index_inter_library_loans_on_item_id"
|
|
544
|
+
|
|
545
|
+
create_table "inventories", :force => true do |t|
|
|
546
|
+
t.integer "item_id"
|
|
547
|
+
t.integer "inventory_file_id"
|
|
548
|
+
t.text "note"
|
|
549
|
+
t.datetime "created_at"
|
|
550
|
+
t.datetime "updated_at"
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
add_index "inventories", ["inventory_file_id"], :name => "index_inventories_on_inventory_file_id"
|
|
554
|
+
add_index "inventories", ["item_id"], :name => "index_inventories_on_item_id"
|
|
555
|
+
|
|
556
|
+
create_table "inventory_files", :force => true do |t|
|
|
557
|
+
t.string "filename"
|
|
558
|
+
t.string "content_type"
|
|
559
|
+
t.integer "size"
|
|
560
|
+
t.string "file_hash"
|
|
561
|
+
t.integer "user_id"
|
|
562
|
+
t.text "note"
|
|
563
|
+
t.datetime "created_at"
|
|
564
|
+
t.datetime "updated_at"
|
|
565
|
+
t.string "inventory_file_name"
|
|
566
|
+
t.string "inventory_content_type"
|
|
567
|
+
t.integer "inventory_file_size"
|
|
568
|
+
t.datetime "inventory_updated_at"
|
|
569
|
+
t.string "inventory_fingerprint"
|
|
570
|
+
t.text "error_message"
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
add_index "inventory_files", ["file_hash"], :name => "index_inventory_files_on_file_hash"
|
|
574
|
+
add_index "inventory_files", ["user_id"], :name => "index_inventory_files_on_user_id"
|
|
575
|
+
|
|
576
|
+
create_table "item_has_use_restrictions", :force => true do |t|
|
|
577
|
+
t.integer "item_id", :null => false
|
|
578
|
+
t.integer "use_restriction_id", :null => false
|
|
579
|
+
t.datetime "created_at"
|
|
580
|
+
t.datetime "updated_at"
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
add_index "item_has_use_restrictions", ["item_id"], :name => "index_item_has_use_restrictions_on_item_id"
|
|
584
|
+
add_index "item_has_use_restrictions", ["use_restriction_id"], :name => "index_item_has_use_restrictions_on_use_restriction_id"
|
|
585
|
+
|
|
586
|
+
create_table "items", :force => true do |t|
|
|
587
|
+
t.string "call_number"
|
|
588
|
+
t.string "item_identifier"
|
|
589
|
+
t.integer "circulation_status_id", :null => false
|
|
590
|
+
t.integer "checkout_type_id", :default => 1, :null => false
|
|
591
|
+
t.datetime "created_at"
|
|
592
|
+
t.datetime "updated_at"
|
|
593
|
+
t.datetime "deleted_at"
|
|
594
|
+
t.integer "shelf_id", :default => 1, :null => false
|
|
595
|
+
t.boolean "include_supplements", :default => false, :null => false
|
|
596
|
+
t.integer "checkouts_count", :default => 0, :null => false
|
|
597
|
+
t.text "note"
|
|
598
|
+
t.string "url"
|
|
599
|
+
t.integer "price"
|
|
600
|
+
t.integer "lock_version", :default => 0, :null => false
|
|
601
|
+
t.integer "required_role_id", :default => 1, :null => false
|
|
602
|
+
t.string "state"
|
|
603
|
+
t.integer "required_score", :default => 0, :null => false
|
|
604
|
+
t.datetime "acquired_at"
|
|
605
|
+
t.integer "bookstore_id"
|
|
606
|
+
t.string "donation"
|
|
607
|
+
t.datetime "missing_since"
|
|
608
|
+
t.integer "budget_type_id"
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
|
|
612
|
+
add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
|
|
613
|
+
add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
|
|
614
|
+
add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier", :unique => true
|
|
615
|
+
add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
|
|
616
|
+
add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
|
|
617
|
+
|
|
618
|
+
create_table "languages", :force => true do |t|
|
|
619
|
+
t.string "name", :null => false
|
|
620
|
+
t.string "native_name"
|
|
621
|
+
t.text "display_name"
|
|
622
|
+
t.string "iso_639_1"
|
|
623
|
+
t.string "iso_639_2"
|
|
624
|
+
t.string "iso_639_3"
|
|
625
|
+
t.text "note"
|
|
626
|
+
t.integer "position"
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
add_index "languages", ["iso_639_1"], :name => "index_languages_on_iso_639_1"
|
|
630
|
+
add_index "languages", ["iso_639_2"], :name => "index_languages_on_iso_639_2"
|
|
631
|
+
add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
|
|
632
|
+
add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
|
|
633
|
+
|
|
634
|
+
create_table "lending_policies", :force => true do |t|
|
|
635
|
+
t.integer "item_id", :null => false
|
|
636
|
+
t.integer "user_group_id", :null => false
|
|
637
|
+
t.integer "loan_period", :default => 0, :null => false
|
|
638
|
+
t.datetime "fixed_due_date"
|
|
639
|
+
t.integer "renewal", :default => 0, :null => false
|
|
640
|
+
t.decimal "fine", :default => 0.0, :null => false
|
|
641
|
+
t.text "note"
|
|
642
|
+
t.integer "position"
|
|
643
|
+
t.datetime "created_at"
|
|
644
|
+
t.datetime "updated_at"
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
add_index "lending_policies", ["item_id"], :name => "index_lending_policies_on_item_id"
|
|
648
|
+
add_index "lending_policies", ["user_group_id"], :name => "index_lending_policies_on_user_group_id"
|
|
649
|
+
|
|
650
|
+
create_table "libraries", :force => true do |t|
|
|
651
|
+
t.integer "patron_id"
|
|
652
|
+
t.string "patron_type"
|
|
653
|
+
t.string "name", :null => false
|
|
654
|
+
t.text "display_name"
|
|
655
|
+
t.string "short_display_name", :null => false
|
|
656
|
+
t.string "zip_code"
|
|
657
|
+
t.text "street"
|
|
658
|
+
t.text "locality"
|
|
659
|
+
t.text "region"
|
|
660
|
+
t.string "telephone_number_1"
|
|
661
|
+
t.string "telephone_number_2"
|
|
662
|
+
t.string "fax_number"
|
|
663
|
+
t.text "note"
|
|
664
|
+
t.integer "call_number_rows", :default => 1, :null => false
|
|
665
|
+
t.string "call_number_delimiter", :default => "|", :null => false
|
|
666
|
+
t.integer "library_group_id", :default => 1, :null => false
|
|
667
|
+
t.integer "users_count", :default => 0, :null => false
|
|
668
|
+
t.integer "position"
|
|
669
|
+
t.integer "country_id"
|
|
670
|
+
t.datetime "created_at"
|
|
671
|
+
t.datetime "updated_at"
|
|
672
|
+
t.datetime "deleted_at"
|
|
673
|
+
t.text "opening_hour"
|
|
674
|
+
t.float "latitude"
|
|
675
|
+
t.float "longitude"
|
|
676
|
+
t.string "calil_systemid"
|
|
677
|
+
t.text "calil_neighborhood_systemid"
|
|
678
|
+
t.string "isil"
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
add_index "libraries", ["library_group_id"], :name => "index_libraries_on_library_group_id"
|
|
682
|
+
add_index "libraries", ["name"], :name => "index_libraries_on_name", :unique => true
|
|
683
|
+
add_index "libraries", ["patron_id"], :name => "index_libraries_on_patron_id", :unique => true
|
|
684
|
+
|
|
685
|
+
create_table "library_groups", :force => true do |t|
|
|
686
|
+
t.string "name", :null => false
|
|
687
|
+
t.text "display_name"
|
|
688
|
+
t.string "short_name", :null => false
|
|
689
|
+
t.string "email"
|
|
690
|
+
t.text "my_networks"
|
|
691
|
+
t.text "login_banner"
|
|
692
|
+
t.text "note"
|
|
693
|
+
t.boolean "post_to_union_catalog", :default => false, :null => false
|
|
694
|
+
t.integer "country_id"
|
|
695
|
+
t.datetime "created_at"
|
|
696
|
+
t.datetime "updated_at"
|
|
697
|
+
t.text "admin_networks"
|
|
698
|
+
t.boolean "allow_bookmark_external_url", :default => false, :null => false
|
|
699
|
+
t.integer "position"
|
|
700
|
+
t.string "url", :default => "http://localhost:3000/"
|
|
701
|
+
end
|
|
702
|
+
|
|
703
|
+
add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
|
|
704
|
+
|
|
705
|
+
create_table "licenses", :force => true do |t|
|
|
706
|
+
t.string "name", :null => false
|
|
707
|
+
t.string "display_name"
|
|
708
|
+
t.text "note"
|
|
709
|
+
t.integer "position"
|
|
710
|
+
t.datetime "created_at"
|
|
711
|
+
t.datetime "updated_at"
|
|
712
|
+
end
|
|
713
|
+
|
|
714
|
+
create_table "logged_exceptions", :force => true do |t|
|
|
715
|
+
t.string "exception_class"
|
|
716
|
+
t.string "controller_name"
|
|
717
|
+
t.string "action_name"
|
|
718
|
+
t.text "message"
|
|
719
|
+
t.text "backtrace"
|
|
720
|
+
t.text "environment"
|
|
721
|
+
t.text "request"
|
|
722
|
+
t.datetime "created_at"
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
create_table "make_types", :force => true do |t|
|
|
726
|
+
t.string "name"
|
|
727
|
+
t.text "display_name"
|
|
728
|
+
t.text "note"
|
|
729
|
+
t.integer "position"
|
|
730
|
+
t.datetime "created_at", :null => false
|
|
731
|
+
t.datetime "updated_at", :null => false
|
|
732
|
+
end
|
|
733
|
+
|
|
734
|
+
create_table "makes", :force => true do |t|
|
|
735
|
+
t.integer "manifestation_id"
|
|
736
|
+
t.integer "patron_id"
|
|
737
|
+
t.integer "make_type_id"
|
|
738
|
+
t.string "make_type_other"
|
|
739
|
+
t.datetime "created_at", :null => false
|
|
740
|
+
t.datetime "updated_at", :null => false
|
|
741
|
+
end
|
|
742
|
+
|
|
743
|
+
add_index "makes", ["manifestation_id"], :name => "index_makes_on_manifestation_id"
|
|
744
|
+
add_index "makes", ["patron_id"], :name => "index_makes_on_patron_id"
|
|
745
|
+
|
|
746
|
+
create_table "manifestation_checkout_stats", :force => true do |t|
|
|
747
|
+
t.datetime "start_date"
|
|
748
|
+
t.datetime "end_date"
|
|
749
|
+
t.text "note"
|
|
750
|
+
t.string "state"
|
|
751
|
+
t.datetime "created_at"
|
|
752
|
+
t.datetime "updated_at"
|
|
753
|
+
t.datetime "started_at"
|
|
754
|
+
t.datetime "completed_at"
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
add_index "manifestation_checkout_stats", ["state"], :name => "index_manifestation_checkout_stats_on_state"
|
|
758
|
+
|
|
759
|
+
create_table "manifestation_relationship_types", :force => true do |t|
|
|
760
|
+
t.string "name", :null => false
|
|
761
|
+
t.text "display_name"
|
|
762
|
+
t.text "note"
|
|
763
|
+
t.integer "position"
|
|
764
|
+
t.datetime "created_at"
|
|
765
|
+
t.datetime "updated_at"
|
|
766
|
+
end
|
|
767
|
+
|
|
768
|
+
create_table "manifestation_relationships", :force => true do |t|
|
|
769
|
+
t.integer "parent_id"
|
|
770
|
+
t.integer "child_id"
|
|
771
|
+
t.integer "manifestation_relationship_type_id"
|
|
772
|
+
t.datetime "created_at"
|
|
773
|
+
t.datetime "updated_at"
|
|
774
|
+
t.integer "position"
|
|
775
|
+
end
|
|
776
|
+
|
|
777
|
+
add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
|
|
778
|
+
add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
|
|
779
|
+
|
|
780
|
+
create_table "manifestation_reserve_stats", :force => true do |t|
|
|
781
|
+
t.datetime "start_date"
|
|
782
|
+
t.datetime "end_date"
|
|
783
|
+
t.text "note"
|
|
784
|
+
t.string "state"
|
|
785
|
+
t.datetime "created_at"
|
|
786
|
+
t.datetime "updated_at"
|
|
787
|
+
t.datetime "started_at"
|
|
788
|
+
t.datetime "completed_at"
|
|
789
|
+
end
|
|
790
|
+
|
|
791
|
+
add_index "manifestation_reserve_stats", ["state"], :name => "index_manifestation_reserve_stats_on_state"
|
|
792
|
+
|
|
793
|
+
create_table "manifestations", :force => true do |t|
|
|
794
|
+
t.text "original_title", :null => false
|
|
795
|
+
t.text "title_alternative"
|
|
796
|
+
t.text "title_transcription"
|
|
797
|
+
t.string "classification_number"
|
|
798
|
+
t.string "manifestation_identifier"
|
|
799
|
+
t.datetime "date_of_publication"
|
|
800
|
+
t.datetime "date_copyrighted"
|
|
801
|
+
t.datetime "created_at"
|
|
802
|
+
t.datetime "updated_at"
|
|
803
|
+
t.datetime "deleted_at"
|
|
804
|
+
t.string "access_address"
|
|
805
|
+
t.integer "language_id", :default => 1, :null => false
|
|
806
|
+
t.integer "carrier_type_id", :default => 1, :null => false
|
|
807
|
+
t.integer "extent_id", :default => 1, :null => false
|
|
808
|
+
t.integer "start_page"
|
|
809
|
+
t.integer "end_page"
|
|
810
|
+
t.decimal "height"
|
|
811
|
+
t.decimal "width"
|
|
812
|
+
t.decimal "depth"
|
|
813
|
+
t.string "isbn"
|
|
814
|
+
t.string "isbn10"
|
|
815
|
+
t.string "wrong_isbn"
|
|
816
|
+
t.string "nbn"
|
|
817
|
+
t.string "lccn"
|
|
818
|
+
t.string "oclc_number"
|
|
819
|
+
t.string "issn"
|
|
820
|
+
t.integer "price"
|
|
821
|
+
t.text "fulltext"
|
|
822
|
+
t.string "volume_number_string"
|
|
823
|
+
t.string "issue_number_string"
|
|
824
|
+
t.string "serial_number_string"
|
|
825
|
+
t.integer "edition"
|
|
826
|
+
t.text "note"
|
|
827
|
+
t.boolean "repository_content", :default => false, :null => false
|
|
828
|
+
t.integer "lock_version", :default => 0, :null => false
|
|
829
|
+
t.integer "required_role_id", :default => 1, :null => false
|
|
830
|
+
t.string "state"
|
|
831
|
+
t.integer "required_score", :default => 0, :null => false
|
|
832
|
+
t.integer "frequency_id", :default => 1, :null => false
|
|
833
|
+
t.boolean "subscription_master", :default => false, :null => false
|
|
834
|
+
t.integer "ipaper_id"
|
|
835
|
+
t.string "ipaper_access_key"
|
|
836
|
+
t.string "attachment_file_name"
|
|
837
|
+
t.string "attachment_content_type"
|
|
838
|
+
t.integer "attachment_file_size"
|
|
839
|
+
t.datetime "attachment_updated_at"
|
|
840
|
+
t.integer "nii_type_id"
|
|
841
|
+
t.text "title_alternative_transcription"
|
|
842
|
+
t.text "description"
|
|
843
|
+
t.text "abstract"
|
|
844
|
+
t.datetime "available_at"
|
|
845
|
+
t.datetime "valid_until"
|
|
846
|
+
t.datetime "date_submitted"
|
|
847
|
+
t.datetime "date_accepted"
|
|
848
|
+
t.datetime "date_caputured"
|
|
849
|
+
t.string "ndl_bib_id"
|
|
850
|
+
t.string "file_hash"
|
|
851
|
+
t.string "pub_date"
|
|
852
|
+
t.string "edition_string"
|
|
853
|
+
t.integer "volume_number"
|
|
854
|
+
t.integer "issue_number"
|
|
855
|
+
t.integer "serial_number"
|
|
856
|
+
t.string "ndc"
|
|
857
|
+
t.text "description_transcription"
|
|
858
|
+
t.integer "content_type_id", :default => 1
|
|
859
|
+
t.integer "year_of_publication"
|
|
860
|
+
t.string "attachment_fingerprint"
|
|
861
|
+
t.text "attachment_meta"
|
|
862
|
+
t.integer "month_of_publication"
|
|
863
|
+
t.string "online_isbn"
|
|
864
|
+
t.string "ncid"
|
|
865
|
+
t.string "doi"
|
|
866
|
+
t.boolean "fulltext_content"
|
|
867
|
+
t.string "udc"
|
|
868
|
+
t.string "extent"
|
|
869
|
+
t.string "supplement"
|
|
870
|
+
end
|
|
871
|
+
|
|
872
|
+
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
|
873
|
+
add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
|
|
874
|
+
add_index "manifestations", ["created_at"], :name => "index_manifestations_on_created_at"
|
|
875
|
+
add_index "manifestations", ["deleted_at"], :name => "index_manifestations_on_deleted_at"
|
|
876
|
+
add_index "manifestations", ["doi"], :name => "index_manifestations_on_doi"
|
|
877
|
+
add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
|
|
878
|
+
add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
|
|
879
|
+
add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
|
|
880
|
+
add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
|
|
881
|
+
add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier", :unique => true
|
|
882
|
+
add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
|
|
883
|
+
add_index "manifestations", ["ncid"], :name => "index_manifestations_on_ncid"
|
|
884
|
+
add_index "manifestations", ["ndl_bib_id"], :name => "index_manifestations_on_ndl_bib_id"
|
|
885
|
+
add_index "manifestations", ["nii_type_id"], :name => "index_manifestations_on_nii_type_id"
|
|
886
|
+
add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
|
|
887
|
+
add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
|
|
888
|
+
add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
|
|
889
|
+
|
|
890
|
+
create_table "medium_of_performances", :force => true do |t|
|
|
891
|
+
t.string "name", :null => false
|
|
892
|
+
t.text "display_name"
|
|
893
|
+
t.text "note"
|
|
894
|
+
t.integer "position"
|
|
895
|
+
t.datetime "created_at"
|
|
896
|
+
t.datetime "updated_at"
|
|
897
|
+
end
|
|
898
|
+
|
|
899
|
+
create_table "message_requests", :force => true do |t|
|
|
900
|
+
t.integer "sender_id"
|
|
901
|
+
t.integer "receiver_id"
|
|
902
|
+
t.integer "message_template_id"
|
|
903
|
+
t.datetime "sent_at"
|
|
904
|
+
t.datetime "deleted_at"
|
|
905
|
+
t.text "body"
|
|
906
|
+
t.string "state"
|
|
907
|
+
t.datetime "created_at"
|
|
908
|
+
t.datetime "updated_at"
|
|
909
|
+
end
|
|
910
|
+
|
|
911
|
+
add_index "message_requests", ["state"], :name => "index_message_requests_on_state"
|
|
912
|
+
|
|
913
|
+
create_table "message_templates", :force => true do |t|
|
|
914
|
+
t.string "status", :null => false
|
|
915
|
+
t.text "title", :null => false
|
|
916
|
+
t.text "body", :null => false
|
|
917
|
+
t.integer "position"
|
|
918
|
+
t.datetime "created_at"
|
|
919
|
+
t.datetime "updated_at"
|
|
920
|
+
t.string "locale", :default => "ja"
|
|
921
|
+
end
|
|
922
|
+
|
|
923
|
+
add_index "message_templates", ["status"], :name => "index_message_templates_on_status", :unique => true
|
|
924
|
+
|
|
925
|
+
create_table "messages", :force => true do |t|
|
|
926
|
+
t.datetime "read_at"
|
|
927
|
+
t.integer "receiver_id"
|
|
928
|
+
t.integer "sender_id"
|
|
929
|
+
t.string "subject", :null => false
|
|
930
|
+
t.text "body"
|
|
931
|
+
t.datetime "created_at"
|
|
932
|
+
t.datetime "updated_at"
|
|
933
|
+
t.integer "message_request_id"
|
|
934
|
+
t.string "state"
|
|
935
|
+
t.integer "parent_id"
|
|
936
|
+
t.integer "lft"
|
|
937
|
+
t.integer "rgt"
|
|
938
|
+
t.integer "depth"
|
|
939
|
+
end
|
|
940
|
+
|
|
941
|
+
add_index "messages", ["message_request_id"], :name => "index_messages_on_message_request_id"
|
|
942
|
+
add_index "messages", ["parent_id"], :name => "index_messages_on_parent_id"
|
|
943
|
+
add_index "messages", ["receiver_id"], :name => "index_messages_on_receiver_id"
|
|
944
|
+
add_index "messages", ["sender_id"], :name => "index_messages_on_sender_id"
|
|
945
|
+
|
|
946
|
+
create_table "news_feeds", :force => true do |t|
|
|
947
|
+
t.integer "library_group_id", :default => 1, :null => false
|
|
948
|
+
t.string "title"
|
|
949
|
+
t.string "url"
|
|
950
|
+
t.text "body"
|
|
951
|
+
t.integer "position"
|
|
952
|
+
t.datetime "created_at", :null => false
|
|
953
|
+
t.datetime "updated_at", :null => false
|
|
954
|
+
end
|
|
955
|
+
|
|
956
|
+
create_table "news_posts", :force => true do |t|
|
|
957
|
+
t.text "title"
|
|
958
|
+
t.text "body"
|
|
959
|
+
t.integer "user_id"
|
|
960
|
+
t.datetime "start_date"
|
|
961
|
+
t.datetime "end_date"
|
|
962
|
+
t.integer "required_role_id", :default => 1, :null => false
|
|
963
|
+
t.text "note"
|
|
964
|
+
t.integer "position"
|
|
965
|
+
t.boolean "draft", :default => false, :null => false
|
|
966
|
+
t.datetime "created_at", :null => false
|
|
967
|
+
t.datetime "updated_at", :null => false
|
|
968
|
+
t.string "title_en"
|
|
969
|
+
t.text "body_en"
|
|
970
|
+
t.boolean "news"
|
|
971
|
+
t.boolean "event"
|
|
972
|
+
t.boolean "nims_only"
|
|
973
|
+
t.string "url"
|
|
974
|
+
t.string "url_en"
|
|
975
|
+
end
|
|
976
|
+
|
|
977
|
+
add_index "news_posts", ["user_id"], :name => "index_news_posts_on_user_id"
|
|
978
|
+
|
|
979
|
+
create_table "nii_types", :force => true do |t|
|
|
980
|
+
t.string "name", :null => false
|
|
981
|
+
t.text "display_name"
|
|
982
|
+
t.text "note"
|
|
983
|
+
t.integer "position"
|
|
984
|
+
t.datetime "created_at"
|
|
985
|
+
t.datetime "updated_at"
|
|
986
|
+
end
|
|
987
|
+
|
|
988
|
+
add_index "nii_types", ["name"], :name => "index_nii_types_on_name", :unique => true
|
|
989
|
+
|
|
990
|
+
create_table "open_id_authentication_associations", :force => true do |t|
|
|
991
|
+
t.integer "issued"
|
|
992
|
+
t.integer "lifetime"
|
|
993
|
+
t.string "handle"
|
|
994
|
+
t.string "assoc_type"
|
|
995
|
+
t.binary "server_url"
|
|
996
|
+
t.binary "secret"
|
|
997
|
+
end
|
|
998
|
+
|
|
999
|
+
create_table "open_id_authentication_nonces", :force => true do |t|
|
|
1000
|
+
t.integer "timestamp", :null => false
|
|
1001
|
+
t.string "server_url"
|
|
1002
|
+
t.string "salt", :null => false
|
|
1003
|
+
end
|
|
1004
|
+
|
|
1005
|
+
create_table "order_lists", :force => true do |t|
|
|
1006
|
+
t.integer "user_id", :null => false
|
|
1007
|
+
t.integer "bookstore_id", :null => false
|
|
1008
|
+
t.text "title", :null => false
|
|
1009
|
+
t.text "note"
|
|
1010
|
+
t.datetime "ordered_at"
|
|
1011
|
+
t.datetime "deleted_at"
|
|
1012
|
+
t.string "state"
|
|
1013
|
+
t.datetime "created_at"
|
|
1014
|
+
t.datetime "updated_at"
|
|
1015
|
+
end
|
|
1016
|
+
|
|
1017
|
+
add_index "order_lists", ["bookstore_id"], :name => "index_order_lists_on_bookstore_id"
|
|
1018
|
+
add_index "order_lists", ["user_id"], :name => "index_order_lists_on_user_id"
|
|
1019
|
+
|
|
1020
|
+
create_table "orders", :force => true do |t|
|
|
1021
|
+
t.integer "order_list_id", :null => false
|
|
1022
|
+
t.integer "purchase_request_id", :null => false
|
|
1023
|
+
t.integer "position"
|
|
1024
|
+
t.string "state"
|
|
1025
|
+
t.datetime "created_at"
|
|
1026
|
+
t.datetime "updated_at"
|
|
1027
|
+
end
|
|
1028
|
+
|
|
1029
|
+
add_index "orders", ["order_list_id"], :name => "index_orders_on_order_list_id"
|
|
1030
|
+
add_index "orders", ["purchase_request_id"], :name => "index_orders_on_purchase_request_id"
|
|
1031
|
+
|
|
1032
|
+
create_table "organizations", :force => true do |t|
|
|
1033
|
+
t.string "name"
|
|
1034
|
+
t.text "display_name"
|
|
1035
|
+
t.text "note"
|
|
1036
|
+
t.integer "position"
|
|
1037
|
+
t.datetime "created_at", :null => false
|
|
1038
|
+
t.datetime "updated_at", :null => false
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
create_table "owns", :force => true do |t|
|
|
1042
|
+
t.integer "patron_id", :null => false
|
|
1043
|
+
t.integer "item_id", :null => false
|
|
1044
|
+
t.integer "position"
|
|
1045
|
+
t.string "type"
|
|
1046
|
+
t.datetime "created_at"
|
|
1047
|
+
t.datetime "updated_at"
|
|
1048
|
+
end
|
|
1049
|
+
|
|
1050
|
+
add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
|
|
1051
|
+
add_index "owns", ["patron_id"], :name => "index_owns_on_patron_id"
|
|
1052
|
+
add_index "owns", ["type"], :name => "index_owns_on_type"
|
|
1053
|
+
|
|
1054
|
+
create_table "participates", :force => true do |t|
|
|
1055
|
+
t.integer "patron_id", :null => false
|
|
1056
|
+
t.integer "event_id", :null => false
|
|
1057
|
+
t.integer "position"
|
|
1058
|
+
t.datetime "created_at"
|
|
1059
|
+
t.datetime "updated_at"
|
|
1060
|
+
end
|
|
1061
|
+
|
|
1062
|
+
add_index "participates", ["event_id"], :name => "index_participates_on_event_id"
|
|
1063
|
+
add_index "participates", ["patron_id"], :name => "index_participates_on_patron_id"
|
|
1064
|
+
|
|
1065
|
+
create_table "patron_import_files", :force => true do |t|
|
|
1066
|
+
t.integer "parent_id"
|
|
1067
|
+
t.string "content_type"
|
|
1068
|
+
t.integer "size"
|
|
1069
|
+
t.string "file_hash"
|
|
1070
|
+
t.integer "user_id"
|
|
1071
|
+
t.text "note"
|
|
1072
|
+
t.string "state"
|
|
1073
|
+
t.string "patron_import_file_name"
|
|
1074
|
+
t.string "patron_import_content_type"
|
|
1075
|
+
t.integer "patron_import_file_size"
|
|
1076
|
+
t.datetime "patron_import_updated_at"
|
|
1077
|
+
t.datetime "created_at"
|
|
1078
|
+
t.datetime "updated_at"
|
|
1079
|
+
t.string "edit_mode"
|
|
1080
|
+
t.string "patron_import_fingerprint"
|
|
1081
|
+
t.text "error_message"
|
|
1082
|
+
t.datetime "executed_at"
|
|
1083
|
+
end
|
|
1084
|
+
|
|
1085
|
+
add_index "patron_import_files", ["file_hash"], :name => "index_patron_import_files_on_file_hash"
|
|
1086
|
+
add_index "patron_import_files", ["parent_id"], :name => "index_patron_import_files_on_parent_id"
|
|
1087
|
+
add_index "patron_import_files", ["state"], :name => "index_patron_import_files_on_state"
|
|
1088
|
+
add_index "patron_import_files", ["user_id"], :name => "index_patron_import_files_on_user_id"
|
|
1089
|
+
|
|
1090
|
+
create_table "patron_import_results", :force => true do |t|
|
|
1091
|
+
t.integer "patron_import_file_id"
|
|
1092
|
+
t.integer "patron_id"
|
|
1093
|
+
t.integer "user_id"
|
|
1094
|
+
t.text "body"
|
|
1095
|
+
t.datetime "created_at"
|
|
1096
|
+
t.datetime "updated_at"
|
|
1097
|
+
end
|
|
1098
|
+
|
|
1099
|
+
create_table "patron_merge_lists", :force => true do |t|
|
|
1100
|
+
t.string "title"
|
|
1101
|
+
t.datetime "created_at"
|
|
1102
|
+
t.datetime "updated_at"
|
|
1103
|
+
end
|
|
1104
|
+
|
|
1105
|
+
create_table "patron_merges", :force => true do |t|
|
|
1106
|
+
t.integer "patron_id", :null => false
|
|
1107
|
+
t.integer "patron_merge_list_id", :null => false
|
|
1108
|
+
t.datetime "created_at"
|
|
1109
|
+
t.datetime "updated_at"
|
|
1110
|
+
end
|
|
1111
|
+
|
|
1112
|
+
add_index "patron_merges", ["patron_id"], :name => "index_patron_merges_on_patron_id"
|
|
1113
|
+
add_index "patron_merges", ["patron_merge_list_id"], :name => "index_patron_merges_on_patron_merge_list_id"
|
|
1114
|
+
|
|
1115
|
+
create_table "patron_relationship_types", :force => true do |t|
|
|
1116
|
+
t.string "name", :null => false
|
|
1117
|
+
t.text "display_name"
|
|
1118
|
+
t.text "note"
|
|
1119
|
+
t.integer "position"
|
|
1120
|
+
t.datetime "created_at"
|
|
1121
|
+
t.datetime "updated_at"
|
|
1122
|
+
end
|
|
1123
|
+
|
|
1124
|
+
create_table "patron_relationships", :force => true do |t|
|
|
1125
|
+
t.integer "parent_id"
|
|
1126
|
+
t.integer "child_id"
|
|
1127
|
+
t.integer "patron_relationship_type_id"
|
|
1128
|
+
t.datetime "created_at"
|
|
1129
|
+
t.datetime "updated_at"
|
|
1130
|
+
t.integer "position"
|
|
1131
|
+
end
|
|
1132
|
+
|
|
1133
|
+
add_index "patron_relationships", ["child_id"], :name => "index_patron_relationships_on_child_id"
|
|
1134
|
+
add_index "patron_relationships", ["parent_id"], :name => "index_patron_relationships_on_parent_id"
|
|
1135
|
+
|
|
1136
|
+
create_table "patron_types", :force => true do |t|
|
|
1137
|
+
t.string "name", :null => false
|
|
1138
|
+
t.text "display_name"
|
|
1139
|
+
t.text "note"
|
|
1140
|
+
t.integer "position"
|
|
1141
|
+
t.datetime "created_at"
|
|
1142
|
+
t.datetime "updated_at"
|
|
1143
|
+
end
|
|
1144
|
+
|
|
1145
|
+
create_table "patrons", :force => true do |t|
|
|
1146
|
+
t.integer "user_id"
|
|
1147
|
+
t.string "last_name"
|
|
1148
|
+
t.string "middle_name"
|
|
1149
|
+
t.string "first_name"
|
|
1150
|
+
t.string "last_name_transcription"
|
|
1151
|
+
t.string "middle_name_transcription"
|
|
1152
|
+
t.string "first_name_transcription"
|
|
1153
|
+
t.string "corporate_name"
|
|
1154
|
+
t.string "corporate_name_transcription"
|
|
1155
|
+
t.string "full_name"
|
|
1156
|
+
t.text "full_name_transcription"
|
|
1157
|
+
t.text "full_name_alternative"
|
|
1158
|
+
t.datetime "created_at"
|
|
1159
|
+
t.datetime "updated_at"
|
|
1160
|
+
t.datetime "deleted_at"
|
|
1161
|
+
t.string "zip_code_1"
|
|
1162
|
+
t.string "zip_code_2"
|
|
1163
|
+
t.text "address_1"
|
|
1164
|
+
t.text "address_2"
|
|
1165
|
+
t.text "address_1_note"
|
|
1166
|
+
t.text "address_2_note"
|
|
1167
|
+
t.string "telephone_number_1"
|
|
1168
|
+
t.string "telephone_number_2"
|
|
1169
|
+
t.string "fax_number_1"
|
|
1170
|
+
t.string "fax_number_2"
|
|
1171
|
+
t.text "other_designation"
|
|
1172
|
+
t.text "place"
|
|
1173
|
+
t.text "street"
|
|
1174
|
+
t.text "locality"
|
|
1175
|
+
t.text "region"
|
|
1176
|
+
t.datetime "date_of_birth"
|
|
1177
|
+
t.datetime "date_of_death"
|
|
1178
|
+
t.integer "language_id", :default => 1, :null => false
|
|
1179
|
+
t.integer "country_id", :default => 1, :null => false
|
|
1180
|
+
t.integer "patron_type_id", :default => 1, :null => false
|
|
1181
|
+
t.integer "lock_version", :default => 0, :null => false
|
|
1182
|
+
t.text "note"
|
|
1183
|
+
t.integer "required_role_id", :default => 1, :null => false
|
|
1184
|
+
t.integer "required_score", :default => 0, :null => false
|
|
1185
|
+
t.string "state"
|
|
1186
|
+
t.text "email"
|
|
1187
|
+
t.text "url"
|
|
1188
|
+
t.text "full_name_alternative_transcription"
|
|
1189
|
+
t.string "title"
|
|
1190
|
+
t.string "birth_date"
|
|
1191
|
+
t.string "death_date"
|
|
1192
|
+
t.string "patron_identifier"
|
|
1193
|
+
end
|
|
1194
|
+
|
|
1195
|
+
add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
|
|
1196
|
+
add_index "patrons", ["full_name"], :name => "index_patrons_on_full_name"
|
|
1197
|
+
add_index "patrons", ["language_id"], :name => "index_patrons_on_language_id"
|
|
1198
|
+
add_index "patrons", ["patron_identifier"], :name => "index_patrons_on_patron_identifier"
|
|
1199
|
+
add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
|
|
1200
|
+
add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
|
|
1201
|
+
|
|
1202
|
+
create_table "permissions", :force => true do |t|
|
|
1203
|
+
t.string "action"
|
|
1204
|
+
t.string "subject_class"
|
|
1205
|
+
t.integer "subject_id"
|
|
1206
|
+
t.integer "role_id"
|
|
1207
|
+
t.datetime "created_at", :null => false
|
|
1208
|
+
t.datetime "updated_at", :null => false
|
|
1209
|
+
end
|
|
1210
|
+
|
|
1211
|
+
add_index "permissions", ["action", "subject_class", "subject_id"], :name => "index_permissions_on_action_and_subject_class_and_subject_id"
|
|
1212
|
+
add_index "permissions", ["role_id"], :name => "index_permissions_on_role_id"
|
|
1213
|
+
|
|
1214
|
+
create_table "picture_files", :force => true do |t|
|
|
1215
|
+
t.integer "picture_attachable_id"
|
|
1216
|
+
t.string "picture_attachable_type"
|
|
1217
|
+
t.integer "size"
|
|
1218
|
+
t.string "content_type"
|
|
1219
|
+
t.text "title"
|
|
1220
|
+
t.text "filename"
|
|
1221
|
+
t.integer "height"
|
|
1222
|
+
t.integer "width"
|
|
1223
|
+
t.string "thumbnail"
|
|
1224
|
+
t.string "file_hash"
|
|
1225
|
+
t.integer "position"
|
|
1226
|
+
t.datetime "created_at"
|
|
1227
|
+
t.datetime "updated_at"
|
|
1228
|
+
t.string "picture_file_name"
|
|
1229
|
+
t.string "picture_content_type"
|
|
1230
|
+
t.integer "picture_file_size"
|
|
1231
|
+
t.datetime "picture_updated_at"
|
|
1232
|
+
t.text "picture_meta"
|
|
1233
|
+
t.string "picture_fingerprint"
|
|
1234
|
+
end
|
|
1235
|
+
|
|
1236
|
+
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :name => "index_picture_files_on_picture_attachable_id_and_type"
|
|
1237
|
+
|
|
1238
|
+
create_table "positions", :force => true do |t|
|
|
1239
|
+
t.string "name"
|
|
1240
|
+
t.text "display_name"
|
|
1241
|
+
t.text "note"
|
|
1242
|
+
t.integer "position"
|
|
1243
|
+
t.datetime "created_at", :null => false
|
|
1244
|
+
t.datetime "updated_at", :null => false
|
|
1245
|
+
end
|
|
1246
|
+
|
|
1247
|
+
create_table "produce_types", :force => true do |t|
|
|
1248
|
+
t.string "name"
|
|
1249
|
+
t.text "display_name"
|
|
1250
|
+
t.text "note"
|
|
1251
|
+
t.integer "position"
|
|
1252
|
+
t.datetime "created_at"
|
|
1253
|
+
t.datetime "updated_at"
|
|
1254
|
+
end
|
|
1255
|
+
|
|
1256
|
+
create_table "produces", :force => true do |t|
|
|
1257
|
+
t.integer "patron_id", :null => false
|
|
1258
|
+
t.integer "manifestation_id", :null => false
|
|
1259
|
+
t.integer "position"
|
|
1260
|
+
t.string "type"
|
|
1261
|
+
t.datetime "created_at"
|
|
1262
|
+
t.datetime "updated_at"
|
|
1263
|
+
t.integer "produce_type_id"
|
|
1264
|
+
end
|
|
1265
|
+
|
|
1266
|
+
add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
|
|
1267
|
+
add_index "produces", ["patron_id"], :name => "index_produces_on_patron_id"
|
|
1268
|
+
add_index "produces", ["type"], :name => "index_produces_on_type"
|
|
1269
|
+
|
|
1270
|
+
create_table "purchase_requests", :force => true do |t|
|
|
1271
|
+
t.integer "user_id", :null => false
|
|
1272
|
+
t.text "title", :null => false
|
|
1273
|
+
t.text "author"
|
|
1274
|
+
t.text "publisher"
|
|
1275
|
+
t.string "isbn"
|
|
1276
|
+
t.datetime "date_of_publication"
|
|
1277
|
+
t.integer "price"
|
|
1278
|
+
t.string "url"
|
|
1279
|
+
t.text "note"
|
|
1280
|
+
t.datetime "accepted_at"
|
|
1281
|
+
t.datetime "denied_at"
|
|
1282
|
+
t.datetime "created_at"
|
|
1283
|
+
t.datetime "updated_at"
|
|
1284
|
+
t.datetime "deleted_at"
|
|
1285
|
+
t.string "state"
|
|
1286
|
+
t.string "pub_date"
|
|
1287
|
+
end
|
|
1288
|
+
|
|
1289
|
+
add_index "purchase_requests", ["state"], :name => "index_purchase_requests_on_state"
|
|
1290
|
+
add_index "purchase_requests", ["user_id"], :name => "index_purchase_requests_on_user_id"
|
|
1291
|
+
|
|
1292
|
+
create_table "questions", :force => true do |t|
|
|
1293
|
+
t.integer "user_id", :null => false
|
|
1294
|
+
t.text "body"
|
|
1295
|
+
t.boolean "shared", :default => true, :null => false
|
|
1296
|
+
t.integer "answers_count", :default => 0, :null => false
|
|
1297
|
+
t.datetime "created_at"
|
|
1298
|
+
t.datetime "updated_at"
|
|
1299
|
+
t.datetime "deleted_at"
|
|
1300
|
+
t.string "state"
|
|
1301
|
+
t.boolean "solved", :default => false, :null => false
|
|
1302
|
+
t.text "note"
|
|
1303
|
+
end
|
|
1304
|
+
|
|
1305
|
+
add_index "questions", ["user_id"], :name => "index_questions_on_user_id"
|
|
1306
|
+
|
|
1307
|
+
create_table "realize_types", :force => true do |t|
|
|
1308
|
+
t.string "name"
|
|
1309
|
+
t.text "display_name"
|
|
1310
|
+
t.text "note"
|
|
1311
|
+
t.integer "position"
|
|
1312
|
+
t.datetime "created_at"
|
|
1313
|
+
t.datetime "updated_at"
|
|
1314
|
+
end
|
|
1315
|
+
|
|
1316
|
+
create_table "realizes", :force => true do |t|
|
|
1317
|
+
t.integer "patron_id", :null => false
|
|
1318
|
+
t.integer "expression_id", :null => false
|
|
1319
|
+
t.integer "position"
|
|
1320
|
+
t.string "type"
|
|
1321
|
+
t.datetime "created_at"
|
|
1322
|
+
t.datetime "updated_at"
|
|
1323
|
+
t.integer "realize_type_id"
|
|
1324
|
+
end
|
|
1325
|
+
|
|
1326
|
+
add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
|
|
1327
|
+
add_index "realizes", ["patron_id"], :name => "index_realizes_on_patron_id"
|
|
1328
|
+
add_index "realizes", ["type"], :name => "index_realizes_on_type"
|
|
1329
|
+
|
|
1330
|
+
create_table "request_status_types", :force => true do |t|
|
|
1331
|
+
t.string "name", :null => false
|
|
1332
|
+
t.text "display_name"
|
|
1333
|
+
t.text "note"
|
|
1334
|
+
t.integer "position"
|
|
1335
|
+
t.datetime "created_at"
|
|
1336
|
+
t.datetime "updated_at"
|
|
1337
|
+
end
|
|
1338
|
+
|
|
1339
|
+
create_table "request_types", :force => true do |t|
|
|
1340
|
+
t.string "name", :null => false
|
|
1341
|
+
t.text "display_name"
|
|
1342
|
+
t.text "note"
|
|
1343
|
+
t.integer "position"
|
|
1344
|
+
t.datetime "created_at"
|
|
1345
|
+
t.datetime "updated_at"
|
|
1346
|
+
end
|
|
1347
|
+
|
|
1348
|
+
create_table "reserve_stat_has_manifestations", :force => true do |t|
|
|
1349
|
+
t.integer "manifestation_reserve_stat_id", :null => false
|
|
1350
|
+
t.integer "manifestation_id", :null => false
|
|
1351
|
+
t.integer "reserves_count"
|
|
1352
|
+
t.datetime "created_at"
|
|
1353
|
+
t.datetime "updated_at"
|
|
1354
|
+
end
|
|
1355
|
+
|
|
1356
|
+
add_index "reserve_stat_has_manifestations", ["manifestation_id"], :name => "index_reserve_stat_has_manifestations_on_manifestation_id"
|
|
1357
|
+
add_index "reserve_stat_has_manifestations", ["manifestation_reserve_stat_id"], :name => "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
|
1358
|
+
|
|
1359
|
+
create_table "reserve_stat_has_users", :force => true do |t|
|
|
1360
|
+
t.integer "user_reserve_stat_id", :null => false
|
|
1361
|
+
t.integer "user_id", :null => false
|
|
1362
|
+
t.integer "reserves_count"
|
|
1363
|
+
t.datetime "created_at"
|
|
1364
|
+
t.datetime "updated_at"
|
|
1365
|
+
end
|
|
1366
|
+
|
|
1367
|
+
add_index "reserve_stat_has_users", ["user_id"], :name => "index_reserve_stat_has_users_on_user_id"
|
|
1368
|
+
add_index "reserve_stat_has_users", ["user_reserve_stat_id"], :name => "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
|
1369
|
+
|
|
1370
|
+
create_table "reserves", :force => true do |t|
|
|
1371
|
+
t.integer "user_id", :null => false
|
|
1372
|
+
t.integer "manifestation_id", :null => false
|
|
1373
|
+
t.integer "item_id"
|
|
1374
|
+
t.integer "request_status_type_id", :null => false
|
|
1375
|
+
t.datetime "checked_out_at"
|
|
1376
|
+
t.datetime "created_at"
|
|
1377
|
+
t.datetime "updated_at"
|
|
1378
|
+
t.datetime "canceled_at"
|
|
1379
|
+
t.datetime "expired_at"
|
|
1380
|
+
t.datetime "deleted_at"
|
|
1381
|
+
t.string "state"
|
|
1382
|
+
t.boolean "expiration_notice_to_patron", :default => false
|
|
1383
|
+
t.boolean "expiration_notice_to_library", :default => false
|
|
1384
|
+
t.datetime "retained_at"
|
|
1385
|
+
t.datetime "postponed_at"
|
|
1386
|
+
end
|
|
1387
|
+
|
|
1388
|
+
add_index "reserves", ["item_id"], :name => "index_reserves_on_item_id"
|
|
1389
|
+
add_index "reserves", ["manifestation_id"], :name => "index_reserves_on_manifestation_id"
|
|
1390
|
+
add_index "reserves", ["request_status_type_id"], :name => "index_reserves_on_request_status_type_id"
|
|
1391
|
+
add_index "reserves", ["state"], :name => "index_reserves_on_state"
|
|
1392
|
+
add_index "reserves", ["user_id"], :name => "index_reserves_on_user_id"
|
|
1393
|
+
|
|
1394
|
+
create_table "resource_import_files", :force => true do |t|
|
|
1395
|
+
t.integer "parent_id"
|
|
1396
|
+
t.string "content_type"
|
|
1397
|
+
t.integer "size"
|
|
1398
|
+
t.string "file_hash"
|
|
1399
|
+
t.integer "user_id"
|
|
1400
|
+
t.text "note"
|
|
1401
|
+
t.string "state"
|
|
1402
|
+
t.string "resource_import_file_name"
|
|
1403
|
+
t.string "resource_import_content_type"
|
|
1404
|
+
t.integer "resource_import_file_size"
|
|
1405
|
+
t.datetime "resource_import_updated_at"
|
|
1406
|
+
t.datetime "created_at"
|
|
1407
|
+
t.datetime "updated_at"
|
|
1408
|
+
t.string "edit_mode"
|
|
1409
|
+
t.string "resource_import_fingerprint"
|
|
1410
|
+
t.text "error_message"
|
|
1411
|
+
t.datetime "executed_at"
|
|
1412
|
+
end
|
|
1413
|
+
|
|
1414
|
+
add_index "resource_import_files", ["file_hash"], :name => "index_resource_import_files_on_file_hash"
|
|
1415
|
+
add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
|
|
1416
|
+
add_index "resource_import_files", ["state"], :name => "index_resource_import_files_on_state"
|
|
1417
|
+
add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
|
|
1418
|
+
|
|
1419
|
+
create_table "resource_import_results", :force => true do |t|
|
|
1420
|
+
t.integer "resource_import_file_id"
|
|
1421
|
+
t.integer "manifestation_id"
|
|
1422
|
+
t.integer "item_id"
|
|
1423
|
+
t.text "body"
|
|
1424
|
+
t.datetime "created_at"
|
|
1425
|
+
t.datetime "updated_at"
|
|
1426
|
+
end
|
|
1427
|
+
|
|
1428
|
+
add_index "resource_import_results", ["item_id"], :name => "index_resource_import_results_on_item_id"
|
|
1429
|
+
add_index "resource_import_results", ["manifestation_id"], :name => "index_resource_import_results_on_manifestation_id"
|
|
1430
|
+
add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
|
|
1431
|
+
|
|
1432
|
+
create_table "roles", :force => true do |t|
|
|
1433
|
+
t.string "name", :null => false
|
|
1434
|
+
t.string "display_name"
|
|
1435
|
+
t.text "note"
|
|
1436
|
+
t.datetime "created_at"
|
|
1437
|
+
t.datetime "updated_at"
|
|
1438
|
+
t.integer "score", :default => 0, :null => false
|
|
1439
|
+
t.integer "position"
|
|
1440
|
+
end
|
|
1441
|
+
|
|
1442
|
+
create_table "rooms", :force => true do |t|
|
|
1443
|
+
t.string "name"
|
|
1444
|
+
t.text "display_name"
|
|
1445
|
+
t.text "note"
|
|
1446
|
+
t.integer "position"
|
|
1447
|
+
t.datetime "created_at", :null => false
|
|
1448
|
+
t.datetime "updated_at", :null => false
|
|
1449
|
+
end
|
|
1450
|
+
|
|
1451
|
+
create_table "search_engines", :force => true do |t|
|
|
1452
|
+
t.string "name", :null => false
|
|
1453
|
+
t.text "display_name"
|
|
1454
|
+
t.string "url", :null => false
|
|
1455
|
+
t.text "base_url", :null => false
|
|
1456
|
+
t.text "http_method", :null => false
|
|
1457
|
+
t.text "query_param", :null => false
|
|
1458
|
+
t.text "additional_param"
|
|
1459
|
+
t.text "note"
|
|
1460
|
+
t.integer "position"
|
|
1461
|
+
t.datetime "created_at"
|
|
1462
|
+
t.datetime "updated_at"
|
|
1463
|
+
end
|
|
1464
|
+
|
|
1465
|
+
create_table "search_histories", :force => true do |t|
|
|
1466
|
+
t.integer "user_id"
|
|
1467
|
+
t.string "operation", :default => "searchRetrieve"
|
|
1468
|
+
t.float "sru_version", :default => 1.2
|
|
1469
|
+
t.string "query"
|
|
1470
|
+
t.integer "start_record"
|
|
1471
|
+
t.integer "maximum_records"
|
|
1472
|
+
t.string "record_packing"
|
|
1473
|
+
t.string "record_schema"
|
|
1474
|
+
t.integer "result_set_ttl"
|
|
1475
|
+
t.string "stylesheet"
|
|
1476
|
+
t.string "extra_request_data"
|
|
1477
|
+
t.integer "number_of_records", :default => 0
|
|
1478
|
+
t.string "result_set_id"
|
|
1479
|
+
t.integer "result_set_idle_time"
|
|
1480
|
+
t.text "records"
|
|
1481
|
+
t.integer "next_record_position"
|
|
1482
|
+
t.text "diagnostics"
|
|
1483
|
+
t.text "extra_response_data"
|
|
1484
|
+
t.text "echoed_search_retrieve_request"
|
|
1485
|
+
t.datetime "created_at"
|
|
1486
|
+
t.datetime "updated_at"
|
|
1487
|
+
end
|
|
1488
|
+
|
|
1489
|
+
add_index "search_histories", ["user_id"], :name => "index_search_histories_on_user_id"
|
|
1490
|
+
|
|
1491
|
+
create_table "series_has_manifestations", :force => true do |t|
|
|
1492
|
+
t.integer "series_statement_id"
|
|
1493
|
+
t.integer "manifestation_id"
|
|
1494
|
+
t.integer "position"
|
|
1495
|
+
t.datetime "created_at"
|
|
1496
|
+
t.datetime "updated_at"
|
|
1497
|
+
end
|
|
1498
|
+
|
|
1499
|
+
add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
|
|
1500
|
+
add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
|
|
1501
|
+
|
|
1502
|
+
create_table "series_statement_merge_lists", :force => true do |t|
|
|
1503
|
+
t.string "title"
|
|
1504
|
+
t.datetime "created_at"
|
|
1505
|
+
t.datetime "updated_at"
|
|
1506
|
+
end
|
|
1507
|
+
|
|
1508
|
+
create_table "series_statement_merges", :force => true do |t|
|
|
1509
|
+
t.integer "series_statement_id", :null => false
|
|
1510
|
+
t.integer "series_statement_merge_list_id", :null => false
|
|
1511
|
+
t.datetime "created_at"
|
|
1512
|
+
t.datetime "updated_at"
|
|
1513
|
+
end
|
|
1514
|
+
|
|
1515
|
+
add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
|
|
1516
|
+
add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
|
|
1517
|
+
|
|
1518
|
+
create_table "series_statement_relationships", :force => true do |t|
|
|
1519
|
+
t.integer "parent_id"
|
|
1520
|
+
t.integer "child_id"
|
|
1521
|
+
t.integer "position"
|
|
1522
|
+
t.datetime "created_at", :null => false
|
|
1523
|
+
t.datetime "updated_at", :null => false
|
|
1524
|
+
end
|
|
1525
|
+
|
|
1526
|
+
create_table "series_statements", :force => true do |t|
|
|
1527
|
+
t.text "original_title"
|
|
1528
|
+
t.text "numbering"
|
|
1529
|
+
t.text "title_subseries"
|
|
1530
|
+
t.text "numbering_subseries"
|
|
1531
|
+
t.integer "position"
|
|
1532
|
+
t.datetime "created_at"
|
|
1533
|
+
t.datetime "updated_at"
|
|
1534
|
+
t.text "title_transcription"
|
|
1535
|
+
t.text "title_alternative"
|
|
1536
|
+
t.string "series_statement_identifier"
|
|
1537
|
+
t.string "issn"
|
|
1538
|
+
t.boolean "periodical"
|
|
1539
|
+
t.integer "root_manifestation_id"
|
|
1540
|
+
t.text "note"
|
|
1541
|
+
t.text "title_subseries_transcription"
|
|
1542
|
+
end
|
|
1543
|
+
|
|
1544
|
+
add_index "series_statements", ["root_manifestation_id"], :name => "index_series_statements_on_manifestation_id"
|
|
1545
|
+
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
|
1546
|
+
|
|
1547
|
+
create_table "sessions", :force => true do |t|
|
|
1548
|
+
t.string "session_id", :null => false
|
|
1549
|
+
t.text "data"
|
|
1550
|
+
t.datetime "created_at"
|
|
1551
|
+
t.datetime "updated_at"
|
|
1552
|
+
end
|
|
1553
|
+
|
|
1554
|
+
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
|
|
1555
|
+
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
|
|
1556
|
+
|
|
1557
|
+
create_table "shelf_types", :force => true do |t|
|
|
1558
|
+
t.string "name"
|
|
1559
|
+
t.text "display_name"
|
|
1560
|
+
t.text "note"
|
|
1561
|
+
t.integer "position"
|
|
1562
|
+
t.datetime "created_at", :null => false
|
|
1563
|
+
t.datetime "updated_at", :null => false
|
|
1564
|
+
end
|
|
1565
|
+
|
|
1566
|
+
create_table "shelves", :force => true do |t|
|
|
1567
|
+
t.string "name", :null => false
|
|
1568
|
+
t.text "display_name"
|
|
1569
|
+
t.text "note"
|
|
1570
|
+
t.integer "library_id", :default => 1, :null => false
|
|
1571
|
+
t.integer "items_count", :default => 0, :null => false
|
|
1572
|
+
t.integer "position"
|
|
1573
|
+
t.datetime "created_at"
|
|
1574
|
+
t.datetime "updated_at"
|
|
1575
|
+
t.datetime "deleted_at"
|
|
1576
|
+
t.boolean "closed", :default => false, :null => false
|
|
1577
|
+
t.integer "shelf_type_id"
|
|
1578
|
+
end
|
|
1579
|
+
|
|
1580
|
+
add_index "shelves", ["library_id"], :name => "index_shelves_on_library_id"
|
|
1581
|
+
|
|
1582
|
+
create_table "sites", :force => true do |t|
|
|
1583
|
+
t.string "name"
|
|
1584
|
+
t.text "display_name"
|
|
1585
|
+
t.text "note"
|
|
1586
|
+
t.integer "position"
|
|
1587
|
+
t.datetime "created_at", :null => false
|
|
1588
|
+
t.datetime "updated_at", :null => false
|
|
1589
|
+
end
|
|
1590
|
+
|
|
1591
|
+
create_table "slugs", :force => true do |t|
|
|
1592
|
+
t.string "name"
|
|
1593
|
+
t.integer "sluggable_id"
|
|
1594
|
+
t.integer "sequence", :default => 1, :null => false
|
|
1595
|
+
t.string "sluggable_type", :limit => 40
|
|
1596
|
+
t.string "scope"
|
|
1597
|
+
t.datetime "created_at"
|
|
1598
|
+
end
|
|
1599
|
+
|
|
1600
|
+
add_index "slugs", ["name", "sluggable_type", "sequence", "scope"], :name => "index_slugs_on_n_s_s_and_s", :unique => true
|
|
1601
|
+
add_index "slugs", ["sluggable_id"], :name => "index_slugs_on_sluggable_id"
|
|
1602
|
+
|
|
1603
|
+
create_table "subject_has_classifications", :force => true do |t|
|
|
1604
|
+
t.integer "subject_id"
|
|
1605
|
+
t.string "subject_type"
|
|
1606
|
+
t.integer "classification_id", :null => false
|
|
1607
|
+
t.datetime "created_at"
|
|
1608
|
+
t.datetime "updated_at"
|
|
1609
|
+
end
|
|
1610
|
+
|
|
1611
|
+
add_index "subject_has_classifications", ["classification_id"], :name => "index_subject_has_classifications_on_classification_id"
|
|
1612
|
+
add_index "subject_has_classifications", ["subject_id"], :name => "index_subject_has_classifications_on_subject_id"
|
|
1613
|
+
|
|
1614
|
+
create_table "subject_heading_type_has_subjects", :force => true do |t|
|
|
1615
|
+
t.integer "subject_id", :null => false
|
|
1616
|
+
t.string "subject_type"
|
|
1617
|
+
t.integer "subject_heading_type_id", :null => false
|
|
1618
|
+
t.datetime "created_at"
|
|
1619
|
+
t.datetime "updated_at"
|
|
1620
|
+
end
|
|
1621
|
+
|
|
1622
|
+
add_index "subject_heading_type_has_subjects", ["subject_id"], :name => "index_subject_heading_type_has_subjects_on_subject_id"
|
|
1623
|
+
|
|
1624
|
+
create_table "subject_heading_types", :force => true do |t|
|
|
1625
|
+
t.string "name", :null => false
|
|
1626
|
+
t.text "display_name"
|
|
1627
|
+
t.text "note"
|
|
1628
|
+
t.integer "position"
|
|
1629
|
+
t.datetime "created_at"
|
|
1630
|
+
t.datetime "updated_at"
|
|
1631
|
+
end
|
|
1632
|
+
|
|
1633
|
+
create_table "subject_types", :force => true do |t|
|
|
1634
|
+
t.string "name", :null => false
|
|
1635
|
+
t.text "display_name"
|
|
1636
|
+
t.text "note"
|
|
1637
|
+
t.integer "position"
|
|
1638
|
+
t.datetime "created_at"
|
|
1639
|
+
t.datetime "updated_at"
|
|
1640
|
+
end
|
|
1641
|
+
|
|
1642
|
+
create_table "subjects", :force => true do |t|
|
|
1643
|
+
t.integer "parent_id"
|
|
1644
|
+
t.integer "use_term_id"
|
|
1645
|
+
t.string "term"
|
|
1646
|
+
t.text "term_transcription"
|
|
1647
|
+
t.integer "subject_type_id", :null => false
|
|
1648
|
+
t.text "scope_note"
|
|
1649
|
+
t.text "note"
|
|
1650
|
+
t.integer "required_role_id", :default => 1, :null => false
|
|
1651
|
+
t.integer "work_has_subjects_count", :default => 0, :null => false
|
|
1652
|
+
t.integer "lock_version", :default => 0, :null => false
|
|
1653
|
+
t.datetime "created_at"
|
|
1654
|
+
t.datetime "updated_at"
|
|
1655
|
+
t.datetime "deleted_at"
|
|
1656
|
+
end
|
|
1657
|
+
|
|
1658
|
+
add_index "subjects", ["parent_id"], :name => "index_subjects_on_parent_id"
|
|
1659
|
+
add_index "subjects", ["required_role_id"], :name => "index_subjects_on_required_role_id"
|
|
1660
|
+
add_index "subjects", ["subject_type_id"], :name => "index_subjects_on_subject_type_id"
|
|
1661
|
+
add_index "subjects", ["term"], :name => "index_subjects_on_term"
|
|
1662
|
+
add_index "subjects", ["use_term_id"], :name => "index_subjects_on_use_term_id"
|
|
1663
|
+
|
|
1664
|
+
create_table "subscribes", :force => true do |t|
|
|
1665
|
+
t.integer "subscription_id", :null => false
|
|
1666
|
+
t.integer "work_id", :null => false
|
|
1667
|
+
t.datetime "start_at", :null => false
|
|
1668
|
+
t.datetime "end_at", :null => false
|
|
1669
|
+
t.datetime "created_at"
|
|
1670
|
+
t.datetime "updated_at"
|
|
1671
|
+
end
|
|
1672
|
+
|
|
1673
|
+
add_index "subscribes", ["subscription_id"], :name => "index_subscribes_on_subscription_id"
|
|
1674
|
+
add_index "subscribes", ["work_id"], :name => "index_subscribes_on_work_id"
|
|
1675
|
+
|
|
1676
|
+
create_table "subscriptions", :force => true do |t|
|
|
1677
|
+
t.text "title", :null => false
|
|
1678
|
+
t.text "note"
|
|
1679
|
+
t.integer "user_id"
|
|
1680
|
+
t.integer "order_list_id"
|
|
1681
|
+
t.datetime "deleted_at"
|
|
1682
|
+
t.integer "subscribes_count", :default => 0, :null => false
|
|
1683
|
+
t.datetime "created_at"
|
|
1684
|
+
t.datetime "updated_at"
|
|
1685
|
+
end
|
|
1686
|
+
|
|
1687
|
+
add_index "subscriptions", ["order_list_id"], :name => "index_subscriptions_on_order_list_id"
|
|
1688
|
+
add_index "subscriptions", ["user_id"], :name => "index_subscriptions_on_user_id"
|
|
1689
|
+
|
|
1690
|
+
create_table "taggings", :force => true do |t|
|
|
1691
|
+
t.integer "tag_id"
|
|
1692
|
+
t.integer "taggable_id"
|
|
1693
|
+
t.string "taggable_type"
|
|
1694
|
+
t.integer "tagger_id"
|
|
1695
|
+
t.string "tagger_type"
|
|
1696
|
+
t.string "context"
|
|
1697
|
+
t.datetime "created_at"
|
|
1698
|
+
end
|
|
1699
|
+
|
|
1700
|
+
add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
|
|
1701
|
+
add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
|
1702
|
+
|
|
1703
|
+
create_table "tags", :force => true do |t|
|
|
1704
|
+
t.string "name"
|
|
1705
|
+
t.string "name_transcription"
|
|
1706
|
+
t.datetime "created_at"
|
|
1707
|
+
t.datetime "updated_at"
|
|
1708
|
+
end
|
|
1709
|
+
|
|
1710
|
+
create_table "use_restrictions", :force => true do |t|
|
|
1711
|
+
t.string "name", :null => false
|
|
1712
|
+
t.text "display_name"
|
|
1713
|
+
t.text "note"
|
|
1714
|
+
t.integer "position"
|
|
1715
|
+
t.datetime "created_at"
|
|
1716
|
+
t.datetime "updated_at"
|
|
1717
|
+
end
|
|
1718
|
+
|
|
1719
|
+
create_table "user_checkout_stats", :force => true do |t|
|
|
1720
|
+
t.datetime "start_date"
|
|
1721
|
+
t.datetime "end_date"
|
|
1722
|
+
t.text "note"
|
|
1723
|
+
t.string "state"
|
|
1724
|
+
t.datetime "created_at"
|
|
1725
|
+
t.datetime "updated_at"
|
|
1726
|
+
t.datetime "started_at"
|
|
1727
|
+
t.datetime "completed_at"
|
|
1728
|
+
end
|
|
1729
|
+
|
|
1730
|
+
add_index "user_checkout_stats", ["state"], :name => "index_user_checkout_stats_on_state"
|
|
1731
|
+
|
|
1732
|
+
create_table "user_group_has_checkout_types", :force => true do |t|
|
|
1733
|
+
t.integer "user_group_id", :null => false
|
|
1734
|
+
t.integer "checkout_type_id", :null => false
|
|
1735
|
+
t.integer "checkout_limit", :default => 0, :null => false
|
|
1736
|
+
t.integer "checkout_period", :default => 0, :null => false
|
|
1737
|
+
t.integer "checkout_renewal_limit", :default => 0, :null => false
|
|
1738
|
+
t.integer "reservation_limit", :default => 0, :null => false
|
|
1739
|
+
t.integer "reservation_expired_period", :default => 7, :null => false
|
|
1740
|
+
t.boolean "set_due_date_before_closing_day", :default => false, :null => false
|
|
1741
|
+
t.datetime "fixed_due_date"
|
|
1742
|
+
t.text "note"
|
|
1743
|
+
t.integer "position"
|
|
1744
|
+
t.datetime "created_at"
|
|
1745
|
+
t.datetime "updated_at"
|
|
1746
|
+
t.integer "current_checkout_count"
|
|
1747
|
+
end
|
|
1748
|
+
|
|
1749
|
+
add_index "user_group_has_checkout_types", ["checkout_type_id"], :name => "index_user_group_has_checkout_types_on_checkout_type_id"
|
|
1750
|
+
add_index "user_group_has_checkout_types", ["user_group_id"], :name => "index_user_group_has_checkout_types_on_user_group_id"
|
|
1751
|
+
|
|
1752
|
+
create_table "user_groups", :force => true do |t|
|
|
1753
|
+
t.string "name"
|
|
1754
|
+
t.string "string"
|
|
1755
|
+
t.text "display_name"
|
|
1756
|
+
t.text "note"
|
|
1757
|
+
t.integer "position"
|
|
1758
|
+
t.datetime "created_at"
|
|
1759
|
+
t.datetime "updated_at"
|
|
1760
|
+
t.datetime "deleted_at"
|
|
1761
|
+
t.integer "valid_period_for_new_user", :default => 0, :null => false
|
|
1762
|
+
t.datetime "expired_at"
|
|
1763
|
+
t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
|
|
1764
|
+
t.integer "number_of_day_to_notify_due_date", :default => 7, :null => false
|
|
1765
|
+
t.integer "number_of_time_to_notify_overdue", :default => 3, :null => false
|
|
1766
|
+
end
|
|
1767
|
+
|
|
1768
|
+
create_table "user_has_roles", :force => true do |t|
|
|
1769
|
+
t.integer "user_id"
|
|
1770
|
+
t.integer "role_id"
|
|
1771
|
+
t.datetime "created_at"
|
|
1772
|
+
t.datetime "updated_at"
|
|
1773
|
+
end
|
|
1774
|
+
|
|
1775
|
+
add_index "user_has_roles", ["role_id"], :name => "index_user_has_roles_on_role_id"
|
|
1776
|
+
add_index "user_has_roles", ["user_id"], :name => "index_user_has_roles_on_user_id"
|
|
1777
|
+
|
|
1778
|
+
create_table "user_reserve_stats", :force => true do |t|
|
|
1779
|
+
t.datetime "start_date"
|
|
1780
|
+
t.datetime "end_date"
|
|
1781
|
+
t.text "note"
|
|
1782
|
+
t.string "state"
|
|
1783
|
+
t.datetime "created_at"
|
|
1784
|
+
t.datetime "updated_at"
|
|
1785
|
+
t.datetime "started_at"
|
|
1786
|
+
t.datetime "completed_at"
|
|
1787
|
+
end
|
|
1788
|
+
|
|
1789
|
+
add_index "user_reserve_stats", ["state"], :name => "index_user_reserve_stats_on_state"
|
|
1790
|
+
|
|
1791
|
+
create_table "users", :force => true do |t|
|
|
1792
|
+
t.string "email", :default => ""
|
|
1793
|
+
t.string "encrypted_password"
|
|
1794
|
+
t.string "confirmation_token"
|
|
1795
|
+
t.datetime "confirmed_at"
|
|
1796
|
+
t.datetime "confirmation_sent_at"
|
|
1797
|
+
t.string "reset_password_token"
|
|
1798
|
+
t.datetime "reset_password_sent_at"
|
|
1799
|
+
t.string "remember_token"
|
|
1800
|
+
t.datetime "remember_created_at"
|
|
1801
|
+
t.integer "sign_in_count", :default => 0
|
|
1802
|
+
t.datetime "current_sign_in_at"
|
|
1803
|
+
t.datetime "last_sign_in_at"
|
|
1804
|
+
t.string "current_sign_in_ip"
|
|
1805
|
+
t.string "last_sign_in_ip"
|
|
1806
|
+
t.integer "failed_attempts", :default => 0
|
|
1807
|
+
t.string "unlock_token"
|
|
1808
|
+
t.datetime "locked_at"
|
|
1809
|
+
t.string "authentication_token"
|
|
1810
|
+
t.string "password_salt"
|
|
1811
|
+
t.datetime "created_at"
|
|
1812
|
+
t.datetime "updated_at"
|
|
1813
|
+
t.datetime "deleted_at"
|
|
1814
|
+
t.string "username"
|
|
1815
|
+
t.integer "library_id", :default => 1, :null => false
|
|
1816
|
+
t.integer "user_group_id", :default => 1, :null => false
|
|
1817
|
+
t.integer "reserves_count", :default => 0, :null => false
|
|
1818
|
+
t.datetime "expired_at"
|
|
1819
|
+
t.integer "libraries_count", :default => 0, :null => false
|
|
1820
|
+
t.integer "bookmarks_count", :default => 0, :null => false
|
|
1821
|
+
t.integer "checkouts_count", :default => 0, :null => false
|
|
1822
|
+
t.string "checkout_icalendar_token"
|
|
1823
|
+
t.integer "questions_count", :default => 0, :null => false
|
|
1824
|
+
t.integer "answers_count", :default => 0, :null => false
|
|
1825
|
+
t.string "answer_feed_token"
|
|
1826
|
+
t.integer "due_date_reminder_days", :default => 1, :null => false
|
|
1827
|
+
t.text "note"
|
|
1828
|
+
t.boolean "share_bookmarks", :default => false, :null => false
|
|
1829
|
+
t.boolean "save_search_history", :default => false, :null => false
|
|
1830
|
+
t.boolean "save_checkout_history", :default => false, :null => false
|
|
1831
|
+
t.integer "required_role_id", :default => 1, :null => false
|
|
1832
|
+
t.text "keyword_list"
|
|
1833
|
+
t.string "user_number"
|
|
1834
|
+
t.string "state"
|
|
1835
|
+
t.integer "required_score", :default => 0, :null => false
|
|
1836
|
+
t.string "locale"
|
|
1837
|
+
t.string "openid_identifier"
|
|
1838
|
+
t.string "oauth_token"
|
|
1839
|
+
t.string "oauth_secret"
|
|
1840
|
+
t.string "enju_access_key"
|
|
1841
|
+
end
|
|
1842
|
+
|
|
1843
|
+
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
|
|
1844
|
+
add_index "users", ["email"], :name => "index_users_on_email"
|
|
1845
|
+
add_index "users", ["enju_access_key"], :name => "index_users_on_enju_access_key", :unique => true
|
|
1846
|
+
add_index "users", ["oauth_secret"], :name => "index_users_on_oauth_secret", :unique => true
|
|
1847
|
+
add_index "users", ["oauth_token"], :name => "index_users_on_oauth_token", :unique => true
|
|
1848
|
+
add_index "users", ["openid_identifier"], :name => "index_users_on_openid_identifier"
|
|
1849
|
+
add_index "users", ["remember_token"], :name => "index_users_on_remember_token", :unique => true
|
|
1850
|
+
add_index "users", ["required_role_id"], :name => "index_users_on_required_role_id"
|
|
1851
|
+
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
|
1852
|
+
add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
|
|
1853
|
+
add_index "users", ["user_group_id"], :name => "index_users_on_user_group_id"
|
|
1854
|
+
add_index "users", ["user_number"], :name => "index_users_on_user_number", :unique => true
|
|
1855
|
+
add_index "users", ["username"], :name => "index_users_on_username", :unique => true
|
|
1856
|
+
|
|
1857
|
+
create_table "versions", :force => true do |t|
|
|
1858
|
+
t.string "item_type", :null => false
|
|
1859
|
+
t.integer "item_id", :null => false
|
|
1860
|
+
t.string "event", :null => false
|
|
1861
|
+
t.string "whodunnit"
|
|
1862
|
+
t.text "object"
|
|
1863
|
+
t.datetime "created_at"
|
|
1864
|
+
end
|
|
1865
|
+
|
|
1866
|
+
add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
|
|
1867
|
+
|
|
1868
|
+
create_table "work_has_subjects", :force => true do |t|
|
|
1869
|
+
t.integer "subject_id"
|
|
1870
|
+
t.string "subject_type"
|
|
1871
|
+
t.integer "work_id"
|
|
1872
|
+
t.datetime "created_at"
|
|
1873
|
+
t.datetime "updated_at"
|
|
1874
|
+
t.integer "position"
|
|
1875
|
+
end
|
|
1876
|
+
|
|
1877
|
+
add_index "work_has_subjects", ["subject_id"], :name => "index_work_has_subjects_on_subject_id"
|
|
1878
|
+
add_index "work_has_subjects", ["work_id"], :name => "index_work_has_subjects_on_work_id"
|
|
1879
|
+
|
|
1880
|
+
create_table "work_merge_lists", :force => true do |t|
|
|
1881
|
+
t.string "title"
|
|
1882
|
+
t.datetime "created_at"
|
|
1883
|
+
t.datetime "updated_at"
|
|
1884
|
+
end
|
|
1885
|
+
|
|
1886
|
+
create_table "work_merges", :force => true do |t|
|
|
1887
|
+
t.integer "work_id", :null => false
|
|
1888
|
+
t.integer "work_merge_list_id", :null => false
|
|
1889
|
+
t.datetime "created_at"
|
|
1890
|
+
t.datetime "updated_at"
|
|
1891
|
+
end
|
|
1892
|
+
|
|
1893
|
+
add_index "work_merges", ["work_id"], :name => "index_work_merges_on_work_id"
|
|
1894
|
+
add_index "work_merges", ["work_merge_list_id"], :name => "index_work_merges_on_work_merge_list_id"
|
|
1895
|
+
|
|
1896
|
+
end
|