enju_trunk_subject 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +36 -0
- data/app/controllers/classification_types_controller.rb +13 -0
- data/app/controllers/classifications_controller.rb +114 -0
- data/app/controllers/subject_has_classifications_controller.rb +97 -0
- data/app/controllers/subject_heading_type_has_subjects_controller.rb +80 -0
- data/app/controllers/subject_heading_types_controller.rb +13 -0
- data/app/controllers/subject_types_controller.rb +13 -0
- data/app/controllers/subjects_controller.rb +216 -0
- data/app/controllers/work_has_subjects_controller.rb +107 -0
- data/app/models/classification.rb +89 -0
- data/app/models/classification_type.rb +20 -0
- data/app/models/enju_subject/ability.rb +55 -0
- data/app/models/subject.rb +100 -0
- data/app/models/subject_has_classification.rb +37 -0
- data/app/models/subject_heading_type.rb +21 -0
- data/app/models/subject_heading_type_has_subject.rb +22 -0
- data/app/models/subject_type.rb +20 -0
- data/app/models/work_has_subject.rb +35 -0
- data/app/views/classification_types/_form.html.erb +19 -0
- data/app/views/classification_types/edit.html.erb +13 -0
- data/app/views/classification_types/index.html.erb +45 -0
- data/app/views/classification_types/new.html.erb +12 -0
- data/app/views/classification_types/show.html.erb +30 -0
- data/app/views/classifications/_form.html.erb +27 -0
- data/app/views/classifications/edit.html.erb +13 -0
- data/app/views/classifications/index.html.erb +54 -0
- data/app/views/classifications/new.html.erb +12 -0
- data/app/views/classifications/show.html.erb +34 -0
- data/app/views/manifestations/_classification_detail.html.erb +14 -0
- data/app/views/manifestations/_subject_detail.html.erb +14 -0
- data/app/views/manifestations/_subject_facet.html.erb +18 -0
- data/app/views/manifestations/_subject_form.html.erb +21 -0
- data/app/views/subject_has_classifications/edit.html.erb +30 -0
- data/app/views/subject_has_classifications/index.html.erb +38 -0
- data/app/views/subject_has_classifications/new.html.erb +32 -0
- data/app/views/subject_has_classifications/show.html.erb +22 -0
- data/app/views/subject_heading_type_has_subjects/edit.html.erb +28 -0
- data/app/views/subject_heading_type_has_subjects/index.html.erb +30 -0
- data/app/views/subject_heading_type_has_subjects/new.html.erb +27 -0
- data/app/views/subject_heading_type_has_subjects/show.html.erb +23 -0
- data/app/views/subject_heading_types/_form.html.erb +19 -0
- data/app/views/subject_heading_types/edit.html.erb +13 -0
- data/app/views/subject_heading_types/index.html.erb +43 -0
- data/app/views/subject_heading_types/new.html.erb +12 -0
- data/app/views/subject_heading_types/show.html.erb +27 -0
- data/app/views/subject_types/_form.html.erb +19 -0
- data/app/views/subject_types/edit.html.erb +13 -0
- data/app/views/subject_types/index.html.erb +43 -0
- data/app/views/subject_types/new.html.erb +12 -0
- data/app/views/subject_types/show.html.erb +29 -0
- data/app/views/subjects/_form.html.erb +42 -0
- data/app/views/subjects/_index.html.erb +48 -0
- data/app/views/subjects/_index_classification.html.erb +57 -0
- data/app/views/subjects/_index_work.html.erb +60 -0
- data/app/views/subjects/_show_work_list.html.erb +15 -0
- data/app/views/subjects/edit.html.erb +13 -0
- data/app/views/subjects/index.atom.builder +10 -0
- data/app/views/subjects/index.html.erb +7 -0
- data/app/views/subjects/index.rss.builder +29 -0
- data/app/views/subjects/new.html.erb +12 -0
- data/app/views/subjects/show.html.erb +69 -0
- data/app/views/subjects/show.js.erb +1 -0
- data/app/views/work_has_subjects/_form.html.erb +24 -0
- data/app/views/work_has_subjects/edit.html.erb +29 -0
- data/app/views/work_has_subjects/index.html.erb +31 -0
- data/app/views/work_has_subjects/new.html.erb +42 -0
- data/app/views/work_has_subjects/show.html.erb +25 -0
- data/config/locales/translation_en.yml +35 -0
- data/config/locales/translation_ja.yml +39 -0
- data/config/routes.rb +7 -0
- data/db/fixtures/classification_types.yml +7 -0
- data/db/fixtures/subject_types.yml +28 -0
- data/db/migrate/029_create_subjects.rb +28 -0
- data/db/migrate/142_create_classifications.rb +19 -0
- data/db/migrate/144_create_classification_types.rb +16 -0
- data/db/migrate/145_create_subject_heading_types.rb +16 -0
- data/db/migrate/146_create_subject_types.rb +16 -0
- data/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
- data/db/migrate/20140427142354_add_classifiation_identifier_to_classification.rb +6 -0
- data/lib/enju_subject.rb +33 -0
- data/lib/enju_subject/engine.rb +8 -0
- data/lib/enju_subject/manifestation.rb +31 -0
- data/lib/enju_subject/master_model.rb +41 -0
- data/lib/enju_subject/version.rb +3 -0
- data/lib/generators/enju_subject/setup/USAGE +8 -0
- data/lib/generators/enju_subject/setup/setup_generator.rb +10 -0
- data/lib/generators/enju_subject/setup/templates/db/fixtures/classification_types.yml +13 -0
- data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_heading_types.yml +39 -0
- data/lib/generators/enju_subject/setup/templates/db/fixtures/subject_types.yml +28 -0
- data/lib/tasks/enju_subject_tasks.rake +19 -0
- data/spec/controllers/classification_types_controller_spec.rb +445 -0
- data/spec/controllers/classifications_controller_spec.rb +441 -0
- data/spec/controllers/subject_heading_types_controller_spec.rb +445 -0
- data/spec/controllers/subject_types_controller_spec.rb +447 -0
- data/spec/controllers/subjects_controller_spec.rb +437 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +47 -0
- data/spec/dummy/app/helpers/application_helper.rb +21 -0
- data/spec/dummy/app/models/ability.rb +59 -0
- data/spec/dummy/app/models/setting.rb +4 -0
- data/spec/dummy/app/models/user.rb +43 -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 +46 -0
- data/spec/dummy/config/application.yml +38 -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 +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +207 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -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/devise.en.yml +57 -0
- data/spec/dummy/config/locales/en.yml +18 -0
- data/spec/dummy/config/locales/ja.yml +18 -0
- data/spec/dummy/config/routes.rb +60 -0
- data/spec/dummy/db/fixtures/roles.yml +25 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +53 -0
- data/spec/dummy/db/migrate/005_create_manifestations.rb +56 -0
- data/spec/dummy/db/migrate/006_create_items.rb +24 -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/077_create_user_groups.rb +12 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +18 -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_agent_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_agent_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_agent_relationship_types.rb +12 -0
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +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_agent_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_agent_relationship.rb +11 -0
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20100925074559_create_agent_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_agent.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/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/20111201121844_create_roles.rb +12 -0
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +8 -0
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +49 -0
- data/spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb +10 -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_agent_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_agent_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/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_agent_identifier_to_agent.rb +6 -0
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
- data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
- data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
- data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
- data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
- data/spec/dummy/db/schema.rb +901 -0
- data/spec/dummy/db/seeds.rb +32 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/fixtures/subjects.yml +72 -0
- data/spec/dummy/test/fixtures/user_groups.yml +13 -0
- data/spec/dummy/test/fixtures/user_has_roles.yml +9 -0
- data/spec/dummy/test/fixtures/users.yml +11 -0
- data/spec/dummy/test/unit/user_group_test.rb +7 -0
- data/spec/dummy/test/unit/user_has_role_test.rb +7 -0
- data/spec/dummy/test/unit/user_test.rb +7 -0
- data/spec/factories/classification.rb +6 -0
- data/spec/factories/classification_type.rb +5 -0
- data/spec/factories/manifestation.rb +6 -0
- data/spec/factories/subject.rb +7 -0
- data/spec/factories/subject_heading_type.rb +5 -0
- data/spec/factories/subject_heading_type_has_subject.rb +6 -0
- data/spec/factories/subject_type.rb +5 -0
- data/spec/factories/user.rb +34 -0
- data/spec/fixtures/agent_types.yml +35 -0
- data/spec/fixtures/agents.yml +143 -0
- data/spec/fixtures/carrier_types.yml +51 -0
- data/spec/fixtures/classification_types.yml +188 -0
- data/spec/fixtures/classifications.yml +118 -0
- data/spec/fixtures/languages.yml +1901 -0
- data/spec/fixtures/library_groups.yml +33 -0
- data/spec/fixtures/manifestations.yml +22 -0
- data/spec/fixtures/roles.yml +21 -0
- data/spec/fixtures/shtsv.tsv +3 -0
- data/spec/fixtures/subject_heading_types.yml +39 -0
- data/spec/fixtures/subject_types.yml +42 -0
- data/spec/fixtures/subjects.yml +80 -0
- data/spec/fixtures/user_groups.yml +25 -0
- data/spec/fixtures/user_has_roles.yml +41 -0
- data/spec/fixtures/users.yml +69 -0
- data/spec/models/classification_spec.rb +46 -0
- data/spec/models/classification_type_spec.rb +21 -0
- data/spec/models/subject_heading_type_spec.rb +21 -0
- data/spec/models/subject_spec.rb +33 -0
- data/spec/models/subject_type_spec.rb +21 -0
- data/spec/requests/subjects_spec.rb +9 -0
- data/spec/routing/subject_heading_types_routing_spec.rb +35 -0
- data/spec/routing/subject_types_routing_spec.rb +35 -0
- data/spec/routing/subjects_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +45 -0
- data/spec/support/controller_macros.rb +48 -0
- data/spec/support/devise.rb +3 -0
- metadata +675 -0
@@ -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
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class AddCreatorStringToSeriesStatement < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :series_statements, :creator_string, :text
|
4
|
+
add_column :series_statements, :volume_number_string, :text
|
5
|
+
add_column :series_statements, :volume_number_transcription_string, :text
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateIdentifiers < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :identifiers do |t|
|
4
|
+
t.string :body, :null => false
|
5
|
+
t.integer :identifier_type_id, :null => false
|
6
|
+
t.integer :manifestation_id
|
7
|
+
t.boolean :primary
|
8
|
+
t.integer :position
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_index :identifiers, [:body, :identifier_type_id]
|
13
|
+
add_index :identifiers, :manifestation_id
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,901 @@
|
|
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 => 20130509185724) 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 "agent_import_files", :force => true do |t|
|
28
|
+
t.integer "parent_id"
|
29
|
+
t.string "content_type"
|
30
|
+
t.integer "size"
|
31
|
+
t.integer "user_id"
|
32
|
+
t.text "note"
|
33
|
+
t.datetime "executed_at"
|
34
|
+
t.string "state"
|
35
|
+
t.string "agent_import_file_name"
|
36
|
+
t.string "agent_import_content_type"
|
37
|
+
t.integer "agent_import_file_size"
|
38
|
+
t.datetime "agent_import_updated_at"
|
39
|
+
t.datetime "created_at", :null => false
|
40
|
+
t.datetime "updated_at", :null => false
|
41
|
+
t.string "agent_import_fingerprint"
|
42
|
+
t.text "error_message"
|
43
|
+
t.string "edit_mode"
|
44
|
+
end
|
45
|
+
|
46
|
+
add_index "agent_import_files", ["parent_id"], :name => "index_agent_import_files_on_parent_id"
|
47
|
+
add_index "agent_import_files", ["state"], :name => "index_agent_import_files_on_state"
|
48
|
+
add_index "agent_import_files", ["user_id"], :name => "index_agent_import_files_on_user_id"
|
49
|
+
|
50
|
+
create_table "agent_import_results", :force => true do |t|
|
51
|
+
t.integer "agent_import_file_id"
|
52
|
+
t.integer "agent_id"
|
53
|
+
t.integer "user_id"
|
54
|
+
t.text "body"
|
55
|
+
t.datetime "created_at", :null => false
|
56
|
+
t.datetime "updated_at", :null => false
|
57
|
+
end
|
58
|
+
|
59
|
+
create_table "agent_relationship_types", :force => true do |t|
|
60
|
+
t.string "name", :null => false
|
61
|
+
t.text "display_name"
|
62
|
+
t.text "note"
|
63
|
+
t.integer "position"
|
64
|
+
t.datetime "created_at", :null => false
|
65
|
+
t.datetime "updated_at", :null => false
|
66
|
+
end
|
67
|
+
|
68
|
+
create_table "agent_relationships", :force => true do |t|
|
69
|
+
t.integer "parent_id"
|
70
|
+
t.integer "child_id"
|
71
|
+
t.integer "agent_relationship_type_id"
|
72
|
+
t.datetime "created_at", :null => false
|
73
|
+
t.datetime "updated_at", :null => false
|
74
|
+
t.integer "position"
|
75
|
+
end
|
76
|
+
|
77
|
+
add_index "agent_relationships", ["child_id"], :name => "index_agent_relationships_on_child_id"
|
78
|
+
add_index "agent_relationships", ["parent_id"], :name => "index_agent_relationships_on_parent_id"
|
79
|
+
|
80
|
+
create_table "agent_types", :force => true do |t|
|
81
|
+
t.string "name", :null => false
|
82
|
+
t.text "display_name"
|
83
|
+
t.text "note"
|
84
|
+
t.integer "position"
|
85
|
+
t.datetime "created_at", :null => false
|
86
|
+
t.datetime "updated_at", :null => false
|
87
|
+
end
|
88
|
+
|
89
|
+
create_table "agents", :force => true do |t|
|
90
|
+
t.integer "user_id"
|
91
|
+
t.string "last_name"
|
92
|
+
t.string "middle_name"
|
93
|
+
t.string "first_name"
|
94
|
+
t.string "last_name_transcription"
|
95
|
+
t.string "middle_name_transcription"
|
96
|
+
t.string "first_name_transcription"
|
97
|
+
t.string "corporate_name"
|
98
|
+
t.string "corporate_name_transcription"
|
99
|
+
t.string "full_name"
|
100
|
+
t.text "full_name_transcription"
|
101
|
+
t.text "full_name_alternative"
|
102
|
+
t.datetime "created_at", :null => false
|
103
|
+
t.datetime "updated_at", :null => false
|
104
|
+
t.datetime "deleted_at"
|
105
|
+
t.string "zip_code_1"
|
106
|
+
t.string "zip_code_2"
|
107
|
+
t.text "address_1"
|
108
|
+
t.text "address_2"
|
109
|
+
t.text "address_1_note"
|
110
|
+
t.text "address_2_note"
|
111
|
+
t.string "telephone_number_1"
|
112
|
+
t.string "telephone_number_2"
|
113
|
+
t.string "fax_number_1"
|
114
|
+
t.string "fax_number_2"
|
115
|
+
t.text "other_designation"
|
116
|
+
t.text "place"
|
117
|
+
t.string "postal_code"
|
118
|
+
t.text "street"
|
119
|
+
t.text "locality"
|
120
|
+
t.text "region"
|
121
|
+
t.datetime "date_of_birth"
|
122
|
+
t.datetime "date_of_death"
|
123
|
+
t.integer "language_id", :default => 1, :null => false
|
124
|
+
t.integer "country_id", :default => 1, :null => false
|
125
|
+
t.integer "agent_type_id", :default => 1, :null => false
|
126
|
+
t.integer "lock_version", :default => 0, :null => false
|
127
|
+
t.text "note"
|
128
|
+
t.integer "required_role_id", :default => 1, :null => false
|
129
|
+
t.integer "required_score", :default => 0, :null => false
|
130
|
+
t.string "state"
|
131
|
+
t.text "email"
|
132
|
+
t.text "url"
|
133
|
+
t.text "full_name_alternative_transcription"
|
134
|
+
t.string "birth_date"
|
135
|
+
t.string "death_date"
|
136
|
+
t.string "agent_identifier"
|
137
|
+
end
|
138
|
+
|
139
|
+
add_index "agents", ["agent_identifier"], :name => "index_agents_on_agent_identifier"
|
140
|
+
add_index "agents", ["country_id"], :name => "index_agents_on_country_id"
|
141
|
+
add_index "agents", ["full_name"], :name => "index_agents_on_full_name"
|
142
|
+
add_index "agents", ["language_id"], :name => "index_agents_on_language_id"
|
143
|
+
add_index "agents", ["required_role_id"], :name => "index_agents_on_required_role_id"
|
144
|
+
add_index "agents", ["user_id"], :name => "index_agents_on_user_id", :unique => true
|
145
|
+
|
146
|
+
create_table "baskets", :force => true do |t|
|
147
|
+
t.integer "user_id"
|
148
|
+
t.text "note"
|
149
|
+
t.integer "lock_version", :default => 0, :null => false
|
150
|
+
t.datetime "created_at", :null => false
|
151
|
+
t.datetime "updated_at", :null => false
|
152
|
+
end
|
153
|
+
|
154
|
+
add_index "baskets", ["user_id"], :name => "index_baskets_on_user_id"
|
155
|
+
|
156
|
+
create_table "bookstores", :force => true do |t|
|
157
|
+
t.text "name", :null => false
|
158
|
+
t.string "zip_code"
|
159
|
+
t.text "address"
|
160
|
+
t.text "note"
|
161
|
+
t.string "telephone_number"
|
162
|
+
t.string "fax_number"
|
163
|
+
t.string "url"
|
164
|
+
t.integer "position"
|
165
|
+
t.datetime "deleted_at"
|
166
|
+
t.datetime "created_at", :null => false
|
167
|
+
t.datetime "updated_at", :null => false
|
168
|
+
end
|
169
|
+
|
170
|
+
create_table "budget_types", :force => true do |t|
|
171
|
+
t.string "name"
|
172
|
+
t.text "display_name"
|
173
|
+
t.text "note"
|
174
|
+
t.integer "position"
|
175
|
+
t.datetime "created_at", :null => false
|
176
|
+
t.datetime "updated_at", :null => false
|
177
|
+
end
|
178
|
+
|
179
|
+
create_table "carrier_types", :force => true do |t|
|
180
|
+
t.string "name", :null => false
|
181
|
+
t.text "display_name"
|
182
|
+
t.text "note"
|
183
|
+
t.integer "position"
|
184
|
+
t.datetime "created_at", :null => false
|
185
|
+
t.datetime "updated_at", :null => false
|
186
|
+
end
|
187
|
+
|
188
|
+
create_table "classification_types", :force => true do |t|
|
189
|
+
t.string "name", :null => false
|
190
|
+
t.text "display_name"
|
191
|
+
t.text "note"
|
192
|
+
t.integer "position"
|
193
|
+
t.datetime "created_at", :null => false
|
194
|
+
t.datetime "updated_at", :null => false
|
195
|
+
end
|
196
|
+
|
197
|
+
create_table "classifications", :force => true do |t|
|
198
|
+
t.integer "parent_id"
|
199
|
+
t.string "category", :null => false
|
200
|
+
t.text "note"
|
201
|
+
t.integer "classification_type_id", :null => false
|
202
|
+
t.datetime "created_at", :null => false
|
203
|
+
t.datetime "updated_at", :null => false
|
204
|
+
t.integer "lft"
|
205
|
+
t.integer "rgt"
|
206
|
+
t.integer "manifestation_id"
|
207
|
+
end
|
208
|
+
|
209
|
+
add_index "classifications", ["category"], :name => "index_classifications_on_category"
|
210
|
+
add_index "classifications", ["classification_type_id"], :name => "index_classifications_on_classification_type_id"
|
211
|
+
add_index "classifications", ["manifestation_id"], :name => "index_classifications_on_manifestation_id"
|
212
|
+
add_index "classifications", ["parent_id"], :name => "index_classifications_on_parent_id"
|
213
|
+
|
214
|
+
create_table "content_types", :force => true do |t|
|
215
|
+
t.string "name", :null => false
|
216
|
+
t.text "display_name"
|
217
|
+
t.text "note"
|
218
|
+
t.integer "position"
|
219
|
+
t.datetime "created_at", :null => false
|
220
|
+
t.datetime "updated_at", :null => false
|
221
|
+
end
|
222
|
+
|
223
|
+
create_table "countries", :force => true do |t|
|
224
|
+
t.string "name", :null => false
|
225
|
+
t.text "display_name"
|
226
|
+
t.string "alpha_2"
|
227
|
+
t.string "alpha_3"
|
228
|
+
t.string "numeric_3"
|
229
|
+
t.text "note"
|
230
|
+
t.integer "position"
|
231
|
+
end
|
232
|
+
|
233
|
+
add_index "countries", ["alpha_2"], :name => "index_countries_on_alpha_2"
|
234
|
+
add_index "countries", ["alpha_3"], :name => "index_countries_on_alpha_3"
|
235
|
+
add_index "countries", ["name"], :name => "index_countries_on_name"
|
236
|
+
add_index "countries", ["numeric_3"], :name => "index_countries_on_numeric_3"
|
237
|
+
|
238
|
+
create_table "create_types", :force => true do |t|
|
239
|
+
t.string "name"
|
240
|
+
t.text "display_name"
|
241
|
+
t.text "note"
|
242
|
+
t.integer "position"
|
243
|
+
t.datetime "created_at", :null => false
|
244
|
+
t.datetime "updated_at", :null => false
|
245
|
+
end
|
246
|
+
|
247
|
+
create_table "creates", :force => true do |t|
|
248
|
+
t.integer "agent_id", :null => false
|
249
|
+
t.integer "work_id", :null => false
|
250
|
+
t.integer "position"
|
251
|
+
t.datetime "created_at", :null => false
|
252
|
+
t.datetime "updated_at", :null => false
|
253
|
+
t.integer "create_type_id"
|
254
|
+
end
|
255
|
+
|
256
|
+
add_index "creates", ["agent_id"], :name => "index_creates_on_agent_id"
|
257
|
+
add_index "creates", ["work_id"], :name => "index_creates_on_work_id"
|
258
|
+
|
259
|
+
create_table "donates", :force => true do |t|
|
260
|
+
t.integer "agent_id", :null => false
|
261
|
+
t.integer "item_id", :null => false
|
262
|
+
t.datetime "created_at", :null => false
|
263
|
+
t.datetime "updated_at", :null => false
|
264
|
+
end
|
265
|
+
|
266
|
+
add_index "donates", ["agent_id"], :name => "index_donates_on_agent_id"
|
267
|
+
add_index "donates", ["item_id"], :name => "index_donates_on_item_id"
|
268
|
+
|
269
|
+
create_table "exemplifies", :force => true do |t|
|
270
|
+
t.integer "manifestation_id", :null => false
|
271
|
+
t.integer "item_id", :null => false
|
272
|
+
t.integer "position"
|
273
|
+
t.datetime "created_at", :null => false
|
274
|
+
t.datetime "updated_at", :null => false
|
275
|
+
end
|
276
|
+
|
277
|
+
add_index "exemplifies", ["item_id"], :name => "index_exemplifies_on_item_id", :unique => true
|
278
|
+
add_index "exemplifies", ["manifestation_id"], :name => "index_exemplifies_on_manifestation_id"
|
279
|
+
|
280
|
+
create_table "extents", :force => true do |t|
|
281
|
+
t.string "name", :null => false
|
282
|
+
t.text "display_name"
|
283
|
+
t.text "note"
|
284
|
+
t.integer "position"
|
285
|
+
t.datetime "created_at", :null => false
|
286
|
+
t.datetime "updated_at", :null => false
|
287
|
+
end
|
288
|
+
|
289
|
+
create_table "form_of_works", :force => true do |t|
|
290
|
+
t.string "name", :null => false
|
291
|
+
t.text "display_name"
|
292
|
+
t.text "note"
|
293
|
+
t.integer "position"
|
294
|
+
t.datetime "created_at", :null => false
|
295
|
+
t.datetime "updated_at", :null => false
|
296
|
+
end
|
297
|
+
|
298
|
+
create_table "frequencies", :force => true do |t|
|
299
|
+
t.string "name", :null => false
|
300
|
+
t.text "display_name"
|
301
|
+
t.text "note"
|
302
|
+
t.integer "position"
|
303
|
+
t.datetime "created_at", :null => false
|
304
|
+
t.datetime "updated_at", :null => false
|
305
|
+
end
|
306
|
+
|
307
|
+
create_table "identifier_types", :force => true do |t|
|
308
|
+
t.string "name"
|
309
|
+
t.text "display_name"
|
310
|
+
t.text "note"
|
311
|
+
t.integer "position"
|
312
|
+
t.datetime "created_at", :null => false
|
313
|
+
t.datetime "updated_at", :null => false
|
314
|
+
end
|
315
|
+
|
316
|
+
create_table "identifiers", :force => true do |t|
|
317
|
+
t.string "body", :null => false
|
318
|
+
t.integer "identifier_type_id", :null => false
|
319
|
+
t.integer "manifestation_id"
|
320
|
+
t.boolean "primary"
|
321
|
+
t.integer "position"
|
322
|
+
t.datetime "created_at", :null => false
|
323
|
+
t.datetime "updated_at", :null => false
|
324
|
+
end
|
325
|
+
|
326
|
+
add_index "identifiers", ["body", "identifier_type_id"], :name => "index_identifiers_on_body_and_identifier_type_id"
|
327
|
+
add_index "identifiers", ["manifestation_id"], :name => "index_identifiers_on_manifestation_id"
|
328
|
+
|
329
|
+
create_table "import_requests", :force => true do |t|
|
330
|
+
t.string "isbn"
|
331
|
+
t.string "state"
|
332
|
+
t.integer "manifestation_id"
|
333
|
+
t.integer "user_id"
|
334
|
+
t.datetime "created_at", :null => false
|
335
|
+
t.datetime "updated_at", :null => false
|
336
|
+
end
|
337
|
+
|
338
|
+
add_index "import_requests", ["isbn"], :name => "index_import_requests_on_isbn"
|
339
|
+
add_index "import_requests", ["manifestation_id"], :name => "index_import_requests_on_manifestation_id"
|
340
|
+
add_index "import_requests", ["user_id"], :name => "index_import_requests_on_user_id"
|
341
|
+
|
342
|
+
create_table "items", :force => true do |t|
|
343
|
+
t.string "call_number"
|
344
|
+
t.string "item_identifier"
|
345
|
+
t.datetime "created_at", :null => false
|
346
|
+
t.datetime "updated_at", :null => false
|
347
|
+
t.datetime "deleted_at"
|
348
|
+
t.integer "shelf_id", :default => 1, :null => false
|
349
|
+
t.boolean "include_supplements", :default => false, :null => false
|
350
|
+
t.text "note"
|
351
|
+
t.string "url"
|
352
|
+
t.integer "price"
|
353
|
+
t.integer "lock_version", :default => 0, :null => false
|
354
|
+
t.integer "required_role_id", :default => 1, :null => false
|
355
|
+
t.string "state"
|
356
|
+
t.integer "required_score", :default => 0, :null => false
|
357
|
+
t.datetime "acquired_at"
|
358
|
+
t.integer "bookstore_id"
|
359
|
+
t.integer "budget_type_id"
|
360
|
+
end
|
361
|
+
|
362
|
+
add_index "items", ["bookstore_id"], :name => "index_items_on_bookstore_id"
|
363
|
+
add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
|
364
|
+
add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
|
365
|
+
add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
|
366
|
+
|
367
|
+
create_table "languages", :force => true do |t|
|
368
|
+
t.string "name", :null => false
|
369
|
+
t.string "native_name"
|
370
|
+
t.text "display_name"
|
371
|
+
t.string "iso_639_1"
|
372
|
+
t.string "iso_639_2"
|
373
|
+
t.string "iso_639_3"
|
374
|
+
t.text "note"
|
375
|
+
t.integer "position"
|
376
|
+
end
|
377
|
+
|
378
|
+
add_index "languages", ["iso_639_1"], :name => "index_languages_on_iso_639_1"
|
379
|
+
add_index "languages", ["iso_639_2"], :name => "index_languages_on_iso_639_2"
|
380
|
+
add_index "languages", ["iso_639_3"], :name => "index_languages_on_iso_639_3"
|
381
|
+
add_index "languages", ["name"], :name => "index_languages_on_name", :unique => true
|
382
|
+
|
383
|
+
create_table "libraries", :force => true do |t|
|
384
|
+
t.string "name", :null => false
|
385
|
+
t.text "display_name"
|
386
|
+
t.string "short_display_name", :null => false
|
387
|
+
t.string "zip_code"
|
388
|
+
t.text "street"
|
389
|
+
t.text "locality"
|
390
|
+
t.text "region"
|
391
|
+
t.string "telephone_number_1"
|
392
|
+
t.string "telephone_number_2"
|
393
|
+
t.string "fax_number"
|
394
|
+
t.text "note"
|
395
|
+
t.integer "call_number_rows", :default => 1, :null => false
|
396
|
+
t.string "call_number_delimiter", :default => "|", :null => false
|
397
|
+
t.integer "library_group_id", :default => 1, :null => false
|
398
|
+
t.integer "users_count", :default => 0, :null => false
|
399
|
+
t.integer "position"
|
400
|
+
t.integer "country_id"
|
401
|
+
t.datetime "created_at", :null => false
|
402
|
+
t.datetime "updated_at", :null => false
|
403
|
+
t.datetime "deleted_at"
|
404
|
+
t.string "isil"
|
405
|
+
end
|
406
|
+
|
407
|
+
add_index "libraries", ["library_group_id"], :name => "index_libraries_on_library_group_id"
|
408
|
+
add_index "libraries", ["name"], :name => "index_libraries_on_name", :unique => true
|
409
|
+
|
410
|
+
create_table "library_groups", :force => true do |t|
|
411
|
+
t.string "name", :null => false
|
412
|
+
t.text "display_name"
|
413
|
+
t.string "short_name", :null => false
|
414
|
+
t.string "email"
|
415
|
+
t.text "my_networks"
|
416
|
+
t.text "login_banner"
|
417
|
+
t.text "note"
|
418
|
+
t.integer "country_id"
|
419
|
+
t.integer "position"
|
420
|
+
t.datetime "created_at", :null => false
|
421
|
+
t.datetime "updated_at", :null => false
|
422
|
+
t.text "admin_networks"
|
423
|
+
t.string "url", :default => "http://localhost:3000/"
|
424
|
+
end
|
425
|
+
|
426
|
+
add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
|
427
|
+
|
428
|
+
create_table "licenses", :force => true do |t|
|
429
|
+
t.string "name", :null => false
|
430
|
+
t.string "display_name"
|
431
|
+
t.text "note"
|
432
|
+
t.integer "position"
|
433
|
+
t.datetime "created_at", :null => false
|
434
|
+
t.datetime "updated_at", :null => false
|
435
|
+
end
|
436
|
+
|
437
|
+
create_table "manifestation_relationship_types", :force => true do |t|
|
438
|
+
t.string "name", :null => false
|
439
|
+
t.text "display_name"
|
440
|
+
t.text "note"
|
441
|
+
t.integer "position"
|
442
|
+
t.datetime "created_at", :null => false
|
443
|
+
t.datetime "updated_at", :null => false
|
444
|
+
end
|
445
|
+
|
446
|
+
create_table "manifestation_relationships", :force => true do |t|
|
447
|
+
t.integer "parent_id"
|
448
|
+
t.integer "child_id"
|
449
|
+
t.integer "manifestation_relationship_type_id"
|
450
|
+
t.datetime "created_at", :null => false
|
451
|
+
t.datetime "updated_at", :null => false
|
452
|
+
t.integer "position"
|
453
|
+
end
|
454
|
+
|
455
|
+
add_index "manifestation_relationships", ["child_id"], :name => "index_manifestation_relationships_on_child_id"
|
456
|
+
add_index "manifestation_relationships", ["parent_id"], :name => "index_manifestation_relationships_on_parent_id"
|
457
|
+
|
458
|
+
create_table "manifestations", :force => true do |t|
|
459
|
+
t.text "original_title", :null => false
|
460
|
+
t.text "title_alternative"
|
461
|
+
t.text "title_transcription"
|
462
|
+
t.string "classification_number"
|
463
|
+
t.string "manifestation_identifier"
|
464
|
+
t.datetime "date_of_publication"
|
465
|
+
t.datetime "date_copyrighted"
|
466
|
+
t.datetime "created_at", :null => false
|
467
|
+
t.datetime "updated_at", :null => false
|
468
|
+
t.datetime "deleted_at"
|
469
|
+
t.string "access_address"
|
470
|
+
t.integer "language_id", :default => 1, :null => false
|
471
|
+
t.integer "carrier_type_id", :default => 1, :null => false
|
472
|
+
t.integer "extent_id", :default => 1, :null => false
|
473
|
+
t.integer "start_page"
|
474
|
+
t.integer "end_page"
|
475
|
+
t.integer "height"
|
476
|
+
t.integer "width"
|
477
|
+
t.integer "depth"
|
478
|
+
t.string "isbn"
|
479
|
+
t.string "isbn10"
|
480
|
+
t.string "wrong_isbn"
|
481
|
+
t.string "nbn"
|
482
|
+
t.string "lccn"
|
483
|
+
t.string "oclc_number"
|
484
|
+
t.string "issn"
|
485
|
+
t.integer "price"
|
486
|
+
t.text "fulltext"
|
487
|
+
t.string "volume_number_string"
|
488
|
+
t.string "issue_number_string"
|
489
|
+
t.string "serial_number_string"
|
490
|
+
t.integer "edition"
|
491
|
+
t.text "note"
|
492
|
+
t.boolean "repository_content", :default => false, :null => false
|
493
|
+
t.integer "lock_version", :default => 0, :null => false
|
494
|
+
t.integer "required_role_id", :default => 1, :null => false
|
495
|
+
t.string "state"
|
496
|
+
t.integer "required_score", :default => 0, :null => false
|
497
|
+
t.integer "frequency_id", :default => 1, :null => false
|
498
|
+
t.boolean "subscription_master", :default => false, :null => false
|
499
|
+
t.string "attachment_file_name"
|
500
|
+
t.string "attachment_content_type"
|
501
|
+
t.integer "attachment_file_size"
|
502
|
+
t.datetime "attachment_updated_at"
|
503
|
+
t.text "title_alternative_transcription"
|
504
|
+
t.text "description"
|
505
|
+
t.text "abstract"
|
506
|
+
t.datetime "available_at"
|
507
|
+
t.datetime "valid_until"
|
508
|
+
t.datetime "date_submitted"
|
509
|
+
t.datetime "date_accepted"
|
510
|
+
t.datetime "date_caputured"
|
511
|
+
t.string "pub_date"
|
512
|
+
t.string "edition_string"
|
513
|
+
t.integer "volume_number"
|
514
|
+
t.integer "issue_number"
|
515
|
+
t.integer "serial_number"
|
516
|
+
t.string "ndc"
|
517
|
+
t.integer "content_type_id", :default => 1
|
518
|
+
t.integer "year_of_publication"
|
519
|
+
t.text "attachment_meta"
|
520
|
+
t.integer "month_of_publication"
|
521
|
+
t.boolean "periodical"
|
522
|
+
t.text "statement_of_responsibility"
|
523
|
+
end
|
524
|
+
|
525
|
+
add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
|
526
|
+
add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
|
527
|
+
add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
|
528
|
+
add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
|
529
|
+
add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
|
530
|
+
add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
|
531
|
+
add_index "manifestations", ["manifestation_identifier"], :name => "index_manifestations_on_manifestation_identifier"
|
532
|
+
add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
|
533
|
+
add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
|
534
|
+
add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
|
535
|
+
add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
|
536
|
+
|
537
|
+
create_table "medium_of_performances", :force => true do |t|
|
538
|
+
t.string "name", :null => false
|
539
|
+
t.text "display_name"
|
540
|
+
t.text "note"
|
541
|
+
t.integer "position"
|
542
|
+
t.datetime "created_at", :null => false
|
543
|
+
t.datetime "updated_at", :null => false
|
544
|
+
end
|
545
|
+
|
546
|
+
create_table "owns", :force => true do |t|
|
547
|
+
t.integer "agent_id", :null => false
|
548
|
+
t.integer "item_id", :null => false
|
549
|
+
t.integer "position"
|
550
|
+
t.datetime "created_at", :null => false
|
551
|
+
t.datetime "updated_at", :null => false
|
552
|
+
end
|
553
|
+
|
554
|
+
add_index "owns", ["agent_id"], :name => "index_owns_on_agent_id"
|
555
|
+
add_index "owns", ["item_id"], :name => "index_owns_on_item_id"
|
556
|
+
|
557
|
+
create_table "picture_files", :force => true do |t|
|
558
|
+
t.integer "picture_attachable_id"
|
559
|
+
t.string "picture_attachable_type"
|
560
|
+
t.string "content_type"
|
561
|
+
t.text "title"
|
562
|
+
t.string "thumbnail"
|
563
|
+
t.integer "position"
|
564
|
+
t.datetime "created_at", :null => false
|
565
|
+
t.datetime "updated_at", :null => false
|
566
|
+
t.string "picture_file_name"
|
567
|
+
t.string "picture_content_type"
|
568
|
+
t.integer "picture_file_size"
|
569
|
+
t.datetime "picture_updated_at"
|
570
|
+
t.text "picture_meta"
|
571
|
+
t.string "picture_fingerprint"
|
572
|
+
end
|
573
|
+
|
574
|
+
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], :name => "index_picture_files_on_picture_attachable_id_and_type"
|
575
|
+
|
576
|
+
create_table "produce_types", :force => true do |t|
|
577
|
+
t.string "name"
|
578
|
+
t.text "display_name"
|
579
|
+
t.text "note"
|
580
|
+
t.integer "position"
|
581
|
+
t.datetime "created_at", :null => false
|
582
|
+
t.datetime "updated_at", :null => false
|
583
|
+
end
|
584
|
+
|
585
|
+
create_table "produces", :force => true do |t|
|
586
|
+
t.integer "agent_id", :null => false
|
587
|
+
t.integer "manifestation_id", :null => false
|
588
|
+
t.integer "position"
|
589
|
+
t.datetime "created_at", :null => false
|
590
|
+
t.datetime "updated_at", :null => false
|
591
|
+
t.integer "produce_type_id"
|
592
|
+
end
|
593
|
+
|
594
|
+
add_index "produces", ["agent_id"], :name => "index_produces_on_agent_id"
|
595
|
+
add_index "produces", ["manifestation_id"], :name => "index_produces_on_manifestation_id"
|
596
|
+
|
597
|
+
create_table "realize_types", :force => true do |t|
|
598
|
+
t.string "name"
|
599
|
+
t.text "display_name"
|
600
|
+
t.text "note"
|
601
|
+
t.integer "position"
|
602
|
+
t.datetime "created_at", :null => false
|
603
|
+
t.datetime "updated_at", :null => false
|
604
|
+
end
|
605
|
+
|
606
|
+
create_table "realizes", :force => true do |t|
|
607
|
+
t.integer "agent_id", :null => false
|
608
|
+
t.integer "expression_id", :null => false
|
609
|
+
t.integer "position"
|
610
|
+
t.datetime "created_at", :null => false
|
611
|
+
t.datetime "updated_at", :null => false
|
612
|
+
t.integer "realize_type_id"
|
613
|
+
end
|
614
|
+
|
615
|
+
add_index "realizes", ["agent_id"], :name => "index_realizes_on_agent_id"
|
616
|
+
add_index "realizes", ["expression_id"], :name => "index_realizes_on_expression_id"
|
617
|
+
|
618
|
+
create_table "request_status_types", :force => true do |t|
|
619
|
+
t.string "name", :null => false
|
620
|
+
t.text "display_name"
|
621
|
+
t.text "note"
|
622
|
+
t.integer "position"
|
623
|
+
t.datetime "created_at", :null => false
|
624
|
+
t.datetime "updated_at", :null => false
|
625
|
+
end
|
626
|
+
|
627
|
+
create_table "request_types", :force => true do |t|
|
628
|
+
t.string "name", :null => false
|
629
|
+
t.text "display_name"
|
630
|
+
t.text "note"
|
631
|
+
t.integer "position"
|
632
|
+
t.datetime "created_at", :null => false
|
633
|
+
t.datetime "updated_at", :null => false
|
634
|
+
end
|
635
|
+
|
636
|
+
create_table "resource_import_files", :force => true do |t|
|
637
|
+
t.integer "parent_id"
|
638
|
+
t.string "content_type"
|
639
|
+
t.integer "size"
|
640
|
+
t.integer "user_id"
|
641
|
+
t.text "note"
|
642
|
+
t.datetime "executed_at"
|
643
|
+
t.string "state"
|
644
|
+
t.string "resource_import_file_name"
|
645
|
+
t.string "resource_import_content_type"
|
646
|
+
t.integer "resource_import_file_size"
|
647
|
+
t.datetime "resource_import_updated_at"
|
648
|
+
t.datetime "created_at", :null => false
|
649
|
+
t.datetime "updated_at", :null => false
|
650
|
+
t.string "edit_mode"
|
651
|
+
t.string "resource_import_fingerprint"
|
652
|
+
t.text "error_message"
|
653
|
+
end
|
654
|
+
|
655
|
+
add_index "resource_import_files", ["parent_id"], :name => "index_resource_import_files_on_parent_id"
|
656
|
+
add_index "resource_import_files", ["state"], :name => "index_resource_import_files_on_state"
|
657
|
+
add_index "resource_import_files", ["user_id"], :name => "index_resource_import_files_on_user_id"
|
658
|
+
|
659
|
+
create_table "resource_import_results", :force => true do |t|
|
660
|
+
t.integer "resource_import_file_id"
|
661
|
+
t.integer "manifestation_id"
|
662
|
+
t.integer "item_id"
|
663
|
+
t.text "body"
|
664
|
+
t.datetime "created_at", :null => false
|
665
|
+
t.datetime "updated_at", :null => false
|
666
|
+
end
|
667
|
+
|
668
|
+
add_index "resource_import_results", ["item_id"], :name => "index_resource_import_results_on_item_id"
|
669
|
+
add_index "resource_import_results", ["manifestation_id"], :name => "index_resource_import_results_on_manifestation_id"
|
670
|
+
add_index "resource_import_results", ["resource_import_file_id"], :name => "index_resource_import_results_on_resource_import_file_id"
|
671
|
+
|
672
|
+
create_table "roles", :force => true do |t|
|
673
|
+
t.string "name"
|
674
|
+
t.text "display_name"
|
675
|
+
t.text "note"
|
676
|
+
t.integer "position"
|
677
|
+
t.datetime "created_at", :null => false
|
678
|
+
t.datetime "updated_at", :null => false
|
679
|
+
end
|
680
|
+
|
681
|
+
create_table "search_engines", :force => true do |t|
|
682
|
+
t.string "name", :null => false
|
683
|
+
t.text "display_name"
|
684
|
+
t.string "url", :null => false
|
685
|
+
t.text "base_url", :null => false
|
686
|
+
t.text "http_method", :null => false
|
687
|
+
t.text "query_param", :null => false
|
688
|
+
t.text "additional_param"
|
689
|
+
t.text "note"
|
690
|
+
t.integer "position"
|
691
|
+
t.datetime "created_at", :null => false
|
692
|
+
t.datetime "updated_at", :null => false
|
693
|
+
end
|
694
|
+
|
695
|
+
create_table "series_has_manifestations", :force => true do |t|
|
696
|
+
t.integer "series_statement_id"
|
697
|
+
t.integer "manifestation_id"
|
698
|
+
t.integer "position"
|
699
|
+
t.datetime "created_at", :null => false
|
700
|
+
t.datetime "updated_at", :null => false
|
701
|
+
end
|
702
|
+
|
703
|
+
add_index "series_has_manifestations", ["manifestation_id"], :name => "index_series_has_manifestations_on_manifestation_id"
|
704
|
+
add_index "series_has_manifestations", ["series_statement_id"], :name => "index_series_has_manifestations_on_series_statement_id"
|
705
|
+
|
706
|
+
create_table "series_statement_merge_lists", :force => true do |t|
|
707
|
+
t.string "title"
|
708
|
+
t.datetime "created_at", :null => false
|
709
|
+
t.datetime "updated_at", :null => false
|
710
|
+
end
|
711
|
+
|
712
|
+
create_table "series_statement_merges", :force => true do |t|
|
713
|
+
t.integer "series_statement_id", :null => false
|
714
|
+
t.integer "series_statement_merge_list_id", :null => false
|
715
|
+
t.datetime "created_at", :null => false
|
716
|
+
t.datetime "updated_at", :null => false
|
717
|
+
end
|
718
|
+
|
719
|
+
add_index "series_statement_merges", ["series_statement_id"], :name => "index_series_statement_merges_on_series_statement_id"
|
720
|
+
add_index "series_statement_merges", ["series_statement_merge_list_id"], :name => "index_series_statement_merges_on_series_statement_merge_list_id"
|
721
|
+
|
722
|
+
create_table "series_statements", :force => true do |t|
|
723
|
+
t.text "original_title"
|
724
|
+
t.text "numbering"
|
725
|
+
t.text "title_subseries"
|
726
|
+
t.text "numbering_subseries"
|
727
|
+
t.integer "position"
|
728
|
+
t.datetime "created_at", :null => false
|
729
|
+
t.datetime "updated_at", :null => false
|
730
|
+
t.text "title_transcription"
|
731
|
+
t.text "title_alternative"
|
732
|
+
t.string "series_statement_identifier"
|
733
|
+
t.string "issn"
|
734
|
+
t.boolean "periodical"
|
735
|
+
t.integer "manifestation_id"
|
736
|
+
t.text "note"
|
737
|
+
t.text "title_subseries_transcription"
|
738
|
+
t.text "creator_string"
|
739
|
+
t.text "volume_number_string"
|
740
|
+
t.text "volume_number_transcription_string"
|
741
|
+
t.boolean "series_master"
|
742
|
+
end
|
743
|
+
|
744
|
+
add_index "series_statements", ["manifestation_id"], :name => "index_series_statements_on_manifestation_id"
|
745
|
+
add_index "series_statements", ["series_statement_identifier"], :name => "index_series_statements_on_series_statement_identifier"
|
746
|
+
|
747
|
+
create_table "shelves", :force => true do |t|
|
748
|
+
t.string "name", :null => false
|
749
|
+
t.text "display_name"
|
750
|
+
t.text "note"
|
751
|
+
t.integer "library_id", :default => 1, :null => false
|
752
|
+
t.integer "items_count", :default => 0, :null => false
|
753
|
+
t.integer "position"
|
754
|
+
t.datetime "created_at", :null => false
|
755
|
+
t.datetime "updated_at", :null => false
|
756
|
+
t.datetime "deleted_at"
|
757
|
+
t.boolean "closed", :default => false, :null => false
|
758
|
+
end
|
759
|
+
|
760
|
+
add_index "shelves", ["library_id"], :name => "index_shelves_on_library_id"
|
761
|
+
|
762
|
+
create_table "subject_heading_types", :force => true do |t|
|
763
|
+
t.string "name", :null => false
|
764
|
+
t.text "display_name"
|
765
|
+
t.text "note"
|
766
|
+
t.integer "position"
|
767
|
+
t.datetime "created_at", :null => false
|
768
|
+
t.datetime "updated_at", :null => false
|
769
|
+
end
|
770
|
+
|
771
|
+
create_table "subject_types", :force => true do |t|
|
772
|
+
t.string "name", :null => false
|
773
|
+
t.text "display_name"
|
774
|
+
t.text "note"
|
775
|
+
t.integer "position"
|
776
|
+
t.datetime "created_at", :null => false
|
777
|
+
t.datetime "updated_at", :null => false
|
778
|
+
end
|
779
|
+
|
780
|
+
create_table "subjects", :force => true do |t|
|
781
|
+
t.integer "parent_id"
|
782
|
+
t.integer "use_term_id"
|
783
|
+
t.string "term"
|
784
|
+
t.text "term_transcription"
|
785
|
+
t.integer "subject_type_id", :null => false
|
786
|
+
t.text "scope_note"
|
787
|
+
t.text "note"
|
788
|
+
t.integer "required_role_id", :default => 1, :null => false
|
789
|
+
t.integer "lock_version", :default => 0, :null => false
|
790
|
+
t.datetime "created_at"
|
791
|
+
t.datetime "updated_at"
|
792
|
+
t.datetime "deleted_at"
|
793
|
+
t.string "url"
|
794
|
+
t.integer "manifestation_id"
|
795
|
+
t.integer "subject_heading_type_id"
|
796
|
+
end
|
797
|
+
|
798
|
+
add_index "subjects", ["manifestation_id"], :name => "index_subjects_on_manifestation_id"
|
799
|
+
add_index "subjects", ["parent_id"], :name => "index_subjects_on_parent_id"
|
800
|
+
add_index "subjects", ["required_role_id"], :name => "index_subjects_on_required_role_id"
|
801
|
+
add_index "subjects", ["subject_type_id"], :name => "index_subjects_on_subject_type_id"
|
802
|
+
add_index "subjects", ["term"], :name => "index_subjects_on_term"
|
803
|
+
add_index "subjects", ["use_term_id"], :name => "index_subjects_on_use_term_id"
|
804
|
+
|
805
|
+
create_table "subscribes", :force => true do |t|
|
806
|
+
t.integer "subscription_id", :null => false
|
807
|
+
t.integer "work_id", :null => false
|
808
|
+
t.datetime "start_at", :null => false
|
809
|
+
t.datetime "end_at", :null => false
|
810
|
+
t.datetime "created_at", :null => false
|
811
|
+
t.datetime "updated_at", :null => false
|
812
|
+
end
|
813
|
+
|
814
|
+
add_index "subscribes", ["subscription_id"], :name => "index_subscribes_on_subscription_id"
|
815
|
+
add_index "subscribes", ["work_id"], :name => "index_subscribes_on_work_id"
|
816
|
+
|
817
|
+
create_table "subscriptions", :force => true do |t|
|
818
|
+
t.text "title", :null => false
|
819
|
+
t.text "note"
|
820
|
+
t.integer "user_id"
|
821
|
+
t.integer "order_list_id"
|
822
|
+
t.datetime "deleted_at"
|
823
|
+
t.integer "subscribes_count", :default => 0, :null => false
|
824
|
+
t.datetime "created_at", :null => false
|
825
|
+
t.datetime "updated_at", :null => false
|
826
|
+
end
|
827
|
+
|
828
|
+
add_index "subscriptions", ["order_list_id"], :name => "index_subscriptions_on_order_list_id"
|
829
|
+
add_index "subscriptions", ["user_id"], :name => "index_subscriptions_on_user_id"
|
830
|
+
|
831
|
+
create_table "user_groups", :force => true do |t|
|
832
|
+
t.string "name"
|
833
|
+
t.text "display_name"
|
834
|
+
t.text "note"
|
835
|
+
t.integer "position"
|
836
|
+
t.datetime "created_at", :null => false
|
837
|
+
t.datetime "updated_at", :null => false
|
838
|
+
t.datetime "deleted_at"
|
839
|
+
t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
|
840
|
+
t.integer "number_of_day_to_notify_due_date", :default => 7, :null => false
|
841
|
+
t.integer "number_of_time_to_notify_overdue", :default => 3, :null => false
|
842
|
+
end
|
843
|
+
|
844
|
+
create_table "user_has_roles", :force => true do |t|
|
845
|
+
t.integer "user_id"
|
846
|
+
t.integer "role_id"
|
847
|
+
t.datetime "created_at", :null => false
|
848
|
+
t.datetime "updated_at", :null => false
|
849
|
+
end
|
850
|
+
|
851
|
+
create_table "users", :force => true do |t|
|
852
|
+
t.datetime "created_at", :null => false
|
853
|
+
t.datetime "updated_at", :null => false
|
854
|
+
t.string "email", :default => "", :null => false
|
855
|
+
t.string "encrypted_password", :default => "", :null => false
|
856
|
+
t.string "reset_password_token"
|
857
|
+
t.datetime "reset_password_sent_at"
|
858
|
+
t.datetime "remember_created_at"
|
859
|
+
t.integer "sign_in_count", :default => 0
|
860
|
+
t.datetime "current_sign_in_at"
|
861
|
+
t.datetime "last_sign_in_at"
|
862
|
+
t.string "current_sign_in_ip"
|
863
|
+
t.string "last_sign_in_ip"
|
864
|
+
t.datetime "confirmation_sent_at"
|
865
|
+
t.string "unconfirmed_email"
|
866
|
+
t.string "username"
|
867
|
+
t.string "user_number"
|
868
|
+
t.string "state"
|
869
|
+
t.string "locale"
|
870
|
+
t.datetime "deleted_at"
|
871
|
+
t.datetime "expired_at"
|
872
|
+
t.integer "library_id", :default => 1, :null => false
|
873
|
+
t.integer "required_role_id", :default => 1, :null => false
|
874
|
+
t.integer "user_group_id", :default => 1, :null => false
|
875
|
+
t.text "note"
|
876
|
+
t.text "keyword_list"
|
877
|
+
t.integer "failed_attempts"
|
878
|
+
t.string "unlock_token"
|
879
|
+
t.datetime "locked_at"
|
880
|
+
t.datetime "confirmed_at"
|
881
|
+
end
|
882
|
+
|
883
|
+
add_index "users", ["email"], :name => "index_users_on_email"
|
884
|
+
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
885
|
+
add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
|
886
|
+
add_index "users", ["user_group_id"], :name => "index_users_on_user_group_id"
|
887
|
+
add_index "users", ["user_number"], :name => "index_users_on_user_number", :unique => true
|
888
|
+
add_index "users", ["username"], :name => "index_users_on_username", :unique => true
|
889
|
+
|
890
|
+
create_table "versions", :force => true do |t|
|
891
|
+
t.string "item_type", :null => false
|
892
|
+
t.integer "item_id", :null => false
|
893
|
+
t.string "event", :null => false
|
894
|
+
t.string "whodunnit"
|
895
|
+
t.text "object"
|
896
|
+
t.datetime "created_at"
|
897
|
+
end
|
898
|
+
|
899
|
+
add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
|
900
|
+
|
901
|
+
end
|