From 0ae4aa391d04bf80a0313267867e9800821f1624 Mon Sep 17 00:00:00 2001 From: Kosuke Tanabe Date: Tue, 20 Aug 2019 19:53:38 +0900 Subject: [PATCH] update dummy migration files --- Gemfile | 3 +- app/models/classification.rb | 6 +- app/models/classification_type.rb | 6 +- app/models/subject.rb | 8 +- app/models/subject_heading_type.rb | 6 +- app/models/subject_type.rb | 6 +- db/migrate/029_create_subjects.rb | 2 +- db/migrate/142_create_classifications.rb | 2 +- db/migrate/144_create_classification_types.rb | 2 +- .../145_create_subject_heading_types.rb | 2 +- db/migrate/146_create_subject_types.rb | 2 +- ...20629_add_lft_and_rgt_to_classification.rb | 2 +- .../20120406020752_add_url_to_subject.rb | 2 +- ...4133816_add_manifestation_id_to_subject.rb | 2 +- ..._add_manifestation_id_to_classification.rb | 2 +- ..._add_subject_heading_type_id_to_subject.rb | 2 +- ...0150923173139_add_url_to_classification.rb | 2 +- ...50925092505_add_label_to_classification.rb | 2 +- .../app/controllers/application_controller.rb | 1 - spec/dummy/db/migrate/001_create_agents.rb | 3 +- .../db/migrate/002_devise_create_users.rb | 2 +- .../db/migrate/005_create_manifestations.rb | 3 +- spec/dummy/db/migrate/006_create_items.rb | 3 +- spec/dummy/db/migrate/012_create_owns.rb | 4 +- spec/dummy/db/migrate/015_create_creates.rb | 4 +- spec/dummy/db/migrate/041_create_roles.rb | 2 +- spec/dummy/db/migrate/047_create_produces.rb | 4 +- spec/dummy/db/migrate/059_create_libraries.rb | 4 +- spec/dummy/db/migrate/069_create_shelves.rb | 4 +- .../db/migrate/073_create_carrier_types.rb | 2 +- .../db/migrate/077_create_user_groups.rb | 4 +- .../db/migrate/080_create_library_groups.rb | 3 +- .../db/migrate/112_create_frequencies.rb | 2 +- .../db/migrate/117_create_form_of_works.rb | 2 +- spec/dummy/db/migrate/120_create_baskets.rb | 2 +- .../dummy/db/migrate/124_create_bookstores.rb | 3 +- spec/dummy/db/migrate/125_create_donates.rb | 8 +- .../130_create_request_status_types.rb | 2 +- .../db/migrate/131_create_request_types.rb | 2 +- .../db/migrate/133_create_agent_merges.rb | 2 +- .../migrate/134_create_agent_merge_lists.rb | 2 +- .../migrate/149_create_message_templates.rb | 2 +- spec/dummy/db/migrate/154_create_messages.rb | 2 +- .../20080819181903_create_message_requests.rb | 2 +- .../migrate/20080830154109_create_realizes.rb | 4 +- .../20080830172106_create_exemplifies.rb | 2 +- .../20080905191442_create_agent_types.rb | 2 +- .../20081006090811_create_subscriptions.rb | 5 +- .../20081006093246_create_subscribes.rb | 2 +- .../20081023092436_create_search_engines.rb | 3 +- .../20081025083323_create_countries.rb | 2 +- .../20081025083905_create_languages.rb | 2 +- .../20081027150907_create_picture_files.rb | 2 +- ...0081028083142_create_agent_import_files.rb | 13 +- ...1028083208_create_resource_import_files.rb | 13 +- ...add_attachments_picture_to_picture_file.rb | 15 - ...attachments_attachment_to_manifestation.rb | 15 - .../migrate/20090719201843_create_extents.rb | 2 +- ...720091106_create_medium_of_performances.rb | 2 +- .../20090720091429_create_content_types.rb | 2 +- ...2151902_create_agent_relationship_types.rb | 2 +- .../20091012101112_add_dcndl_schema.rb | 2 +- .../migrate/20091025080447_create_licenses.rb | 2 +- .../migrate/20091202124834_create_versions.rb | 2 +- ...20091214131723_create_series_statements.rb | 2 +- .../20100129142347_create_import_requests.rb | 8 +- ...551_add_admin_networks_to_library_group.rb | 2 +- ...eries_statement_title_to_original_title.rb | 2 +- ...00314190054_add_opening_hour_to_library.rb | 2 +- ...tatement_identifier_to_series_statement.rb | 2 +- ...4311_create_manifestation_relationships.rb | 2 +- .../20100606065209_create_user_has_roles.rb | 2 +- ...100606073747_create_agent_relationships.rb | 2 +- ...create_manifestation_relationship_types.rb | 2 +- ...1104_add_position_to_agent_relationship.rb | 2 +- ...25043847_create_resource_import_results.rb | 2 +- ...00925074559_create_agent_import_results.rb | 2 +- .../20101212070145_add_acquired_at_to_item.rb | 2 +- ...20110222073537_add_url_to_library_group.rb | 2 +- ...301035123_add_pub_date_to_manifestation.rb | 2 +- ..._add_birth_date_and_death_date_to_agent.rb | 2 +- ...valid_period_for_new_user_to_user_group.rb | 2 +- ...7_add_edit_mode_to_resource_import_file.rb | 2 +- ...807_add_edition_string_to_manifestation.rb | 2 +- ...20110620173525_add_bookstore_id_to_item.rb | 2 +- ...940_create_series_statement_merge_lists.rb | 2 +- ...27035057_create_series_statement_merges.rb | 2 +- ...110913115320_add_lft_and_rgt_to_message.rb | 2 +- ...1020_add_volume_number_to_manifestation.rb | 2 +- ...dd_manifestaiton_id_to_series_statement.rb | 2 +- ...0918162329_add_note_to_series_statement.rb | 2 +- .../20111124110059_create_create_types.rb | 2 +- .../20111124110319_create_realize_types.rb | 2 +- .../20111124110355_create_produce_types.rb | 2 +- ...0111124112131_add_create_type_to_create.rb | 2 +- .../20120105074911_add_isil_to_library.rb | 2 +- .../20120125050502_add_depth_to_message.rb | 2 +- ...eries_transcription_to_series_statement.rb | 2 +- .../20120129014038_create_budget_types.rb | 2 +- ...120129020544_add_budget_type_id_to_item.rb | 2 +- ...38_add_content_type_id_to_manifestation.rb | 2 +- .../migrate/20120319173203_create_accepts.rb | 2 +- ...dd_year_of_publication_to_manifestation.rb | 2 +- ...072700_add_picture_meta_to_picture_file.rb | 2 +- ...3100352_add_fingerprint_to_picture_file.rb | 2 +- ...add_fingerprint_to_resource_import_file.rb | 2 +- ...03_add_fingerprint_to_agent_import_file.rb | 2 +- ...d_error_message_to_resource_import_file.rb | 2 +- ..._add_error_message_to_agent_import_file.rb | 2 +- ...21_add_attachment_meta_to_manifestation.rb | 5 - ...d_month_of_publication_to_manifestation.rb | 2 +- .../20120510140958_add_closed_to_shelf.rb | 2 +- ...511072422_add_agent_identifier_to_agent.rb | 2 +- ...1129_add_edit_mode_to_agent_import_file.rb | 2 +- ...6_add_fulltext_content_to_manifestation.rb | 2 +- ...20121116033446_add_doi_to_manifestation.rb | 2 +- ...54434_add_additional_attributes_to_user.rb | 2 +- ...6_add_latitude_and_longitude_to_library.rb | 2 +- ...1093852_add_periodical_to_manifestation.rb | 2 +- ..._add_creator_string_to_series_statement.rb | 2 +- ...4_add_series_master_to_series_statement.rb | 2 +- ...ot_manifestation_id_to_series_statement.rb | 2 +- .../20130506175303_create_identifier_types.rb | 2 +- .../20130506175834_create_identifiers.rb | 8 +- ...ment_of_responsibility_to_manifestation.rb | 2 +- ...20140110122216_create_user_import_files.rb | 8 +- ...140110131010_create_user_import_results.rb | 2 +- .../migrate/20140122054321_create_profiles.rb | 2 +- ...140518111006_create_message_transitions.rb | 2 +- ...5713_create_message_request_transitions.rb | 2 +- ...create_resource_import_file_transitions.rb | 2 +- ...71220_create_import_request_transitions.rb | 2 +- ...35_create_agent_import_file_transitions.rb | 2 +- ...813_create_user_import_file_transitions.rb | 2 +- ..._email_unique_constraint_enju_leaf_rc10.rb | 2 +- ...0614065404_create_resource_export_files.rb | 5 +- ...create_resource_export_file_transitions.rb | 2 +- ...7_add_user_encoding_to_user_import_file.rb | 2 +- ..._add_user_encoding_to_agent_import_file.rb | 2 +- ...d_user_encoding_to_resource_import_file.rb | 2 +- ...20140709113413_create_user_export_files.rb | 5 +- ...905_create_user_export_file_transitions.rb | 2 +- ...916_add_binding_item_identifier_to_item.rb | 2 +- ..._default_library_id_to_user_import_file.rb | 2 +- ...fault_user_group_id_to_user_import_file.rb | 2 +- ...efault_shelf_id_to_resource_import_file.rb | 2 +- ...0802082007_add_manifestation_id_to_item.rb | 2 +- ...0140811031145_add_expired_at_to_profile.rb | 2 +- ..._add_publication_place_to_manifestation.rb | 2 +- .../migrate/20140821151023_create_colors.rb | 2 +- ...error_message_to_resource_import_result.rb | 2 +- ...40823083524_add_extent_to_manifestation.rb | 2 +- ...3094847_add_dimensions_to_manifestation.rb | 2 +- ...name_manifestation_periodical_to_serial.rb | 2 +- ..._add_full_name_transcription_to_profile.rb | 2 +- ...1003182825_add_date_of_birth_to_profile.rb | 2 +- ...key_to_items_referencing_manifestations.rb | 2 +- ...221063719_add_settings_to_library_group.rb | 2 +- .../20150421023923_create_identities.rb | 2 +- ...add_error_message_to_user_import_result.rb | 2 +- .../20150924115059_create_withdraws.rb | 2 +- .../20151125004028_add_profile_id_to_agent.rb | 2 +- ...20151126005552_add_provider_to_identity.rb | 2 +- ..._add_translation_table_to_library_group.rb | 2 +- ...2705_add_footer_banner_to_library_group.rb | 2 +- .../20160319144230_create_issn_records.rb | 11 + .../20160506144040_create_isbn_records.rb | 11 + ...93229_add_html_snippet_to_library_group.rb | 2 +- ..._recent_to_user_import_file_transitions.rb | 2 +- ..._recent_to_user_export_file_transitions.rb | 2 +- ..._add_most_recent_to_message_transitions.rb | 2 +- ...st_recent_to_import_request_transitions.rb | 2 +- ...ent_to_resource_import_file_transitions.rb | 2 +- ...ent_to_resource_export_file_transitions.rb | 2 +- ...recent_to_agent_import_file_transitions.rb | 2 +- ...02604_add_picture_width_to_picture_file.rb | 2 +- ..._max_number_of_results_to_library_group.rb | 2 +- ..._add_family_name_first_to_library_group.rb | 2 +- ...r_facet_range_interval_to_library_group.rb | 2 +- ...0813203039_add_user_id_to_library_group.rb | 2 +- ...t_recent_to_message_request_transitions.rb | 2 +- ..._attachment_attachment_to_carrier_types.rb | 11 - ...7_create_issn_record_and_manifestations.rb | 11 + ...0_create_isbn_record_and_manifestations.rb | 11 + ...csv_charset_conversion_to_library_group.rb | 2 +- ...084528_add_header_logo_to_library_group.rb | 5 - ...t_not_null_to_manifestation_id_on_items.rb | 2 +- ...rename_login_banner_to_old_login_banner.rb | 2 +- ...eign_key_to_library_group_id_on_library.rb | 2 +- ...1_add_header_logo_meta_to_library_group.rb | 2 +- ...recent_for_user_import_file_transitions.rb | 2 +- ...recent_for_user_export_file_transitions.rb | 2 +- ...ecent_for_agent_import_file_transitions.rb | 2 +- ...nt_for_resource_import_file_transitions.rb | 2 +- ...nt_for_resource_export_file_transitions.rb | 2 +- ...t_recent_for_import_request_transitions.rb | 2 +- .../20190102034126_create_doi_records.rb | 13 + .../20190311154610_create_periodicals.rb | 10 + ...39_create_periodical_and_manifestations.rb | 11 + ...0190818075603_add_memo_to_manifestation.rb | 5 + .../20190818075628_add_memo_to_item.rb | 5 + spec/dummy/db/schema.rb | 708 +++++++++--------- spec/fixtures/classification_types.yml | 6 +- spec/fixtures/classifications.yml | 6 +- spec/fixtures/subject_heading_types.yml | 6 +- spec/fixtures/subject_types.yml | 6 +- spec/fixtures/subjects.yml | 8 +- spec/models/classification_spec.rb | 6 +- spec/models/classification_type_spec.rb | 6 +- spec/models/subject_heading_type_spec.rb | 6 +- spec/models/subject_spec.rb | 8 +- spec/models/subject_type_spec.rb | 6 +- 212 files changed, 701 insertions(+), 681 deletions(-) delete mode 100644 spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb delete mode 100644 spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb delete mode 100644 spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb create mode 100644 spec/dummy/db/migrate/20160319144230_create_issn_records.rb create mode 100644 spec/dummy/db/migrate/20160506144040_create_isbn_records.rb delete mode 100644 spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb create mode 100644 spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb create mode 100644 spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb delete mode 100644 spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb create mode 100644 spec/dummy/db/migrate/20190102034126_create_doi_records.rb create mode 100644 spec/dummy/db/migrate/20190311154610_create_periodicals.rb create mode 100644 spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb create mode 100644 spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb create mode 100644 spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb diff --git a/Gemfile b/Gemfile index 5708656c..77ec303c 100644 --- a/Gemfile +++ b/Gemfile @@ -13,13 +13,12 @@ gemspec # To use debugger # gem 'debugger' +gem 'rails', '~> 5.2' gem 'enju_seed', github: 'next-l/enju_seed' gem 'enju_leaf', github: 'next-l/enju_leaf' gem 'enju_library', github: 'next-l/enju_library' gem 'enju_biblio', github: 'next-l/enju_biblio' gem 'sassc-rails' -gem 'paper_trail' -gem 'paperclip-meta' group :test do gem 'rails-controller-testing' gem 'rspec_junit_formatter' diff --git a/app/models/classification.rb b/app/models/classification.rb index 04db084d..ad270eee 100644 --- a/app/models/classification.rb +++ b/app/models/classification.rb @@ -17,13 +17,13 @@ class Classification < ApplicationRecord # # Table name: classifications # -# id :integer not null, primary key +# id :bigint not null, primary key # parent_id :integer # category :string not null # note :text # classification_type_id :integer not null -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # lft :integer # rgt :integer # manifestation_id :integer diff --git a/app/models/classification_type.rb b/app/models/classification_type.rb index 3af98ec5..994fe695 100644 --- a/app/models/classification_type.rb +++ b/app/models/classification_type.rb @@ -8,11 +8,11 @@ class ClassificationType < ApplicationRecord # # Table name: classification_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/app/models/subject.rb b/app/models/subject.rb index 6192a705..75fb20d3 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -22,15 +22,15 @@ class Subject < ApplicationRecord # # Table name: subjects # -# id :integer not null, primary key -# parent_id :integer +# id :bigint not null, primary key +# parent_id :bigint # use_term_id :integer # term :string # term_transcription :text -# subject_type_id :integer not null +# subject_type_id :bigint not null # scope_note :text # note :text -# required_role_id :integer default(1), not null +# required_role_id :bigint default(1), not null # lock_version :integer default(0), not null # created_at :datetime # updated_at :datetime diff --git a/app/models/subject_heading_type.rb b/app/models/subject_heading_type.rb index d1ae4989..73be5e40 100644 --- a/app/models/subject_heading_type.rb +++ b/app/models/subject_heading_type.rb @@ -8,11 +8,11 @@ class SubjectHeadingType < ApplicationRecord # # Table name: subject_heading_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/app/models/subject_type.rb b/app/models/subject_type.rb index 6c833109..cb319928 100644 --- a/app/models/subject_type.rb +++ b/app/models/subject_type.rb @@ -8,11 +8,11 @@ class SubjectType < ApplicationRecord # # Table name: subject_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/db/migrate/029_create_subjects.rb b/db/migrate/029_create_subjects.rb index 1e50fced..f201fb23 100644 --- a/db/migrate/029_create_subjects.rb +++ b/db/migrate/029_create_subjects.rb @@ -1,4 +1,4 @@ -class CreateSubjects < ActiveRecord::Migration[4.2] +class CreateSubjects < ActiveRecord::Migration[5.2] def self.up create_table :subjects do |t| t.references :parent, index: true diff --git a/db/migrate/142_create_classifications.rb b/db/migrate/142_create_classifications.rb index 0d9d8347..6bce5c04 100644 --- a/db/migrate/142_create_classifications.rb +++ b/db/migrate/142_create_classifications.rb @@ -1,4 +1,4 @@ -class CreateClassifications < ActiveRecord::Migration[4.2] +class CreateClassifications < ActiveRecord::Migration[5.2] def self.up create_table :classifications do |t| t.integer :parent_id diff --git a/db/migrate/144_create_classification_types.rb b/db/migrate/144_create_classification_types.rb index c4f78d25..d7dbe716 100644 --- a/db/migrate/144_create_classification_types.rb +++ b/db/migrate/144_create_classification_types.rb @@ -1,4 +1,4 @@ -class CreateClassificationTypes < ActiveRecord::Migration[4.2] +class CreateClassificationTypes < ActiveRecord::Migration[5.2] def self.up create_table :classification_types do |t| t.string :name, null: false diff --git a/db/migrate/145_create_subject_heading_types.rb b/db/migrate/145_create_subject_heading_types.rb index 83071c03..377fd718 100644 --- a/db/migrate/145_create_subject_heading_types.rb +++ b/db/migrate/145_create_subject_heading_types.rb @@ -1,4 +1,4 @@ -class CreateSubjectHeadingTypes < ActiveRecord::Migration[4.2] +class CreateSubjectHeadingTypes < ActiveRecord::Migration[5.2] def self.up create_table :subject_heading_types do |t| t.string :name, null: false diff --git a/db/migrate/146_create_subject_types.rb b/db/migrate/146_create_subject_types.rb index 060672f8..c6c75839 100644 --- a/db/migrate/146_create_subject_types.rb +++ b/db/migrate/146_create_subject_types.rb @@ -1,4 +1,4 @@ -class CreateSubjectTypes < ActiveRecord::Migration[4.2] +class CreateSubjectTypes < ActiveRecord::Migration[5.2] def self.up create_table :subject_types do |t| t.string :name, null: false diff --git a/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb b/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb index 80402369..674edb10 100644 --- a/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +++ b/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb @@ -1,4 +1,4 @@ -class AddLftAndRgtToClassification < ActiveRecord::Migration[4.2] +class AddLftAndRgtToClassification < ActiveRecord::Migration[5.2] def self.up add_column :classifications, :lft, :integer add_column :classifications, :rgt, :integer diff --git a/db/migrate/20120406020752_add_url_to_subject.rb b/db/migrate/20120406020752_add_url_to_subject.rb index 57c0e940..6dd4ef98 100644 --- a/db/migrate/20120406020752_add_url_to_subject.rb +++ b/db/migrate/20120406020752_add_url_to_subject.rb @@ -1,4 +1,4 @@ -class AddUrlToSubject < ActiveRecord::Migration[4.2] +class AddUrlToSubject < ActiveRecord::Migration[5.2] def change add_column :subjects, :url, :string end diff --git a/db/migrate/20130504133816_add_manifestation_id_to_subject.rb b/db/migrate/20130504133816_add_manifestation_id_to_subject.rb index de024b84..8f23637a 100644 --- a/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +++ b/db/migrate/20130504133816_add_manifestation_id_to_subject.rb @@ -1,4 +1,4 @@ -class AddManifestationIdToSubject < ActiveRecord::Migration[4.2] +class AddManifestationIdToSubject < ActiveRecord::Migration[5.2] def change add_column :subjects, :manifestation_id, :integer add_index :subjects, :manifestation_id diff --git a/db/migrate/20130504143515_add_manifestation_id_to_classification.rb b/db/migrate/20130504143515_add_manifestation_id_to_classification.rb index 181a938e..77a37d2c 100644 --- a/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +++ b/db/migrate/20130504143515_add_manifestation_id_to_classification.rb @@ -1,4 +1,4 @@ -class AddManifestationIdToClassification < ActiveRecord::Migration[4.2] +class AddManifestationIdToClassification < ActiveRecord::Migration[5.2] def change add_column :classifications, :manifestation_id, :integer add_index :classifications, :manifestation_id diff --git a/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb b/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb index 65be0635..f037518b 100644 --- a/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +++ b/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb @@ -1,4 +1,4 @@ -class AddSubjectHeadingTypeIdToSubject < ActiveRecord::Migration[4.2] +class AddSubjectHeadingTypeIdToSubject < ActiveRecord::Migration[5.2] def change add_column :subjects, :subject_heading_type_id, :integer end diff --git a/db/migrate/20150923173139_add_url_to_classification.rb b/db/migrate/20150923173139_add_url_to_classification.rb index 366ea197..88571238 100644 --- a/db/migrate/20150923173139_add_url_to_classification.rb +++ b/db/migrate/20150923173139_add_url_to_classification.rb @@ -1,4 +1,4 @@ -class AddUrlToClassification < ActiveRecord::Migration[4.2] +class AddUrlToClassification < ActiveRecord::Migration[5.2] def change add_column :classifications, :url, :string end diff --git a/db/migrate/20150925092505_add_label_to_classification.rb b/db/migrate/20150925092505_add_label_to_classification.rb index 9509f192..eca59cf1 100644 --- a/db/migrate/20150925092505_add_label_to_classification.rb +++ b/db/migrate/20150925092505_add_label_to_classification.rb @@ -1,4 +1,4 @@ -class AddLabelToClassification < ActiveRecord::Migration[4.2] +class AddLabelToClassification < ActiveRecord::Migration[5.2] def change add_column :classifications, :label, :string end diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/dummy/app/controllers/application_controller.rb index cee20611..24371105 100644 --- a/spec/dummy/app/controllers/application_controller.rb +++ b/spec/dummy/app/controllers/application_controller.rb @@ -4,7 +4,6 @@ class ApplicationController < ActionController::Base include EnjuLibrary::Controller include EnjuBiblio::Controller include EnjuSubject::Controller - before_action :set_paper_trail_whodunnit after_action :verify_authorized include Pundit diff --git a/spec/dummy/db/migrate/001_create_agents.rb b/spec/dummy/db/migrate/001_create_agents.rb index 6651f0e3..952641ab 100644 --- a/spec/dummy/db/migrate/001_create_agents.rb +++ b/spec/dummy/db/migrate/001_create_agents.rb @@ -1,4 +1,4 @@ -class CreateAgents < ActiveRecord::Migration[4.2] +class CreateAgents < ActiveRecord::Migration[5.2] def change create_table :agents do |t| t.string :last_name @@ -13,7 +13,6 @@ def change t.text :full_name_transcription t.text :full_name_alternative t.timestamps - t.datetime :deleted_at t.string :zip_code_1 t.string :zip_code_2 t.text :address_1 diff --git a/spec/dummy/db/migrate/002_devise_create_users.rb b/spec/dummy/db/migrate/002_devise_create_users.rb index 192b5a09..9d956534 100644 --- a/spec/dummy/db/migrate/002_devise_create_users.rb +++ b/spec/dummy/db/migrate/002_devise_create_users.rb @@ -1,4 +1,4 @@ -class DeviseCreateUsers < ActiveRecord::Migration[4.2] +class DeviseCreateUsers < ActiveRecord::Migration[5.2] def change create_table(:users) do |t| ## Database authenticatable diff --git a/spec/dummy/db/migrate/005_create_manifestations.rb b/spec/dummy/db/migrate/005_create_manifestations.rb index 77d8f22b..f11936d9 100644 --- a/spec/dummy/db/migrate/005_create_manifestations.rb +++ b/spec/dummy/db/migrate/005_create_manifestations.rb @@ -1,4 +1,4 @@ -class CreateManifestations < ActiveRecord::Migration[4.2] +class CreateManifestations < ActiveRecord::Migration[5.2] def change create_table :manifestations do |t| t.text :original_title, null: false @@ -9,7 +9,6 @@ def change t.datetime :date_of_publication t.datetime :copyright_date t.timestamps - t.datetime :deleted_at t.string :access_address t.integer :language_id, default: 1, null: false t.integer :carrier_type_id, default: 1, null: false diff --git a/spec/dummy/db/migrate/006_create_items.rb b/spec/dummy/db/migrate/006_create_items.rb index bbee7f52..0c0f99da 100644 --- a/spec/dummy/db/migrate/006_create_items.rb +++ b/spec/dummy/db/migrate/006_create_items.rb @@ -1,10 +1,9 @@ -class CreateItems < ActiveRecord::Migration[4.2] +class CreateItems < ActiveRecord::Migration[5.2] def change create_table :items do |t| t.string :call_number t.string :item_identifier t.timestamps - t.datetime :deleted_at t.integer :shelf_id, default: 1, null: false t.boolean :include_supplements, default: false, null: false t.text :note diff --git a/spec/dummy/db/migrate/012_create_owns.rb b/spec/dummy/db/migrate/012_create_owns.rb index 6fa3c98d..b71cdfc4 100644 --- a/spec/dummy/db/migrate/012_create_owns.rb +++ b/spec/dummy/db/migrate/012_create_owns.rb @@ -1,4 +1,4 @@ -class CreateOwns < ActiveRecord::Migration[4.2] +class CreateOwns < ActiveRecord::Migration[5.2] def change create_table :owns do |t| t.references :agent, null: false @@ -6,7 +6,5 @@ def change t.integer :position t.timestamps end - add_index :owns, :agent_id - add_index :owns, :item_id end end diff --git a/spec/dummy/db/migrate/015_create_creates.rb b/spec/dummy/db/migrate/015_create_creates.rb index c394f948..9bbc48ad 100644 --- a/spec/dummy/db/migrate/015_create_creates.rb +++ b/spec/dummy/db/migrate/015_create_creates.rb @@ -1,4 +1,4 @@ -class CreateCreates < ActiveRecord::Migration[4.2] +class CreateCreates < ActiveRecord::Migration[5.2] def change create_table :creates do |t| t.references :agent, null: false @@ -6,7 +6,5 @@ def change t.integer :position t.timestamps end - add_index :creates, :agent_id - add_index :creates, :work_id end end diff --git a/spec/dummy/db/migrate/041_create_roles.rb b/spec/dummy/db/migrate/041_create_roles.rb index 49d5e42c..bb0ecee7 100644 --- a/spec/dummy/db/migrate/041_create_roles.rb +++ b/spec/dummy/db/migrate/041_create_roles.rb @@ -1,4 +1,4 @@ -class CreateRoles < ActiveRecord::Migration[4.2] +class CreateRoles < ActiveRecord::Migration[5.2] def change create_table "roles" do |t| t.column :name, :string, null: false diff --git a/spec/dummy/db/migrate/047_create_produces.rb b/spec/dummy/db/migrate/047_create_produces.rb index 144f2cf2..6fe27b8b 100644 --- a/spec/dummy/db/migrate/047_create_produces.rb +++ b/spec/dummy/db/migrate/047_create_produces.rb @@ -1,4 +1,4 @@ -class CreateProduces < ActiveRecord::Migration[4.2] +class CreateProduces < ActiveRecord::Migration[5.2] def change create_table :produces do |t| t.references :agent, null: false @@ -6,7 +6,5 @@ def change t.integer :position t.timestamps end - add_index :produces, :agent_id - add_index :produces, :manifestation_id end end diff --git a/spec/dummy/db/migrate/059_create_libraries.rb b/spec/dummy/db/migrate/059_create_libraries.rb index 38011ca2..8cb7e594 100644 --- a/spec/dummy/db/migrate/059_create_libraries.rb +++ b/spec/dummy/db/migrate/059_create_libraries.rb @@ -1,8 +1,7 @@ -class CreateLibraries < ActiveRecord::Migration[4.2] +class CreateLibraries < ActiveRecord::Migration[5.2] def change create_table :libraries do |t| t.string :name, index: true, null: false - t.text :display_name t.string :short_display_name, null: false t.string :zip_code t.text :street @@ -20,7 +19,6 @@ def change t.references :country t.timestamps - t.datetime :deleted_at end end end diff --git a/spec/dummy/db/migrate/069_create_shelves.rb b/spec/dummy/db/migrate/069_create_shelves.rb index b75e5725..95f8d54f 100644 --- a/spec/dummy/db/migrate/069_create_shelves.rb +++ b/spec/dummy/db/migrate/069_create_shelves.rb @@ -1,14 +1,12 @@ -class CreateShelves < ActiveRecord::Migration[4.2] +class CreateShelves < ActiveRecord::Migration[5.2] def change create_table :shelves do |t| t.string :name, null: false - t.text :display_name t.text :note t.references :library, index: true, null: false t.integer :items_count, default: 0, null: false t.integer :position t.timestamps - t.datetime :deleted_at end end end diff --git a/spec/dummy/db/migrate/073_create_carrier_types.rb b/spec/dummy/db/migrate/073_create_carrier_types.rb index 46183646..3d6a79b7 100644 --- a/spec/dummy/db/migrate/073_create_carrier_types.rb +++ b/spec/dummy/db/migrate/073_create_carrier_types.rb @@ -1,4 +1,4 @@ -class CreateCarrierTypes < ActiveRecord::Migration[4.2] +class CreateCarrierTypes < ActiveRecord::Migration[5.2] def change create_table :carrier_types do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/077_create_user_groups.rb b/spec/dummy/db/migrate/077_create_user_groups.rb index 1ee5636f..03689fae 100644 --- a/spec/dummy/db/migrate/077_create_user_groups.rb +++ b/spec/dummy/db/migrate/077_create_user_groups.rb @@ -1,12 +1,10 @@ -class CreateUserGroups < ActiveRecord::Migration[4.2] +class CreateUserGroups < ActiveRecord::Migration[5.2] def change create_table :user_groups do |t| t.string :name, not_null: true - t.text :display_name t.text :note t.integer :position t.timestamps - t.datetime :deleted_at end end end diff --git a/spec/dummy/db/migrate/080_create_library_groups.rb b/spec/dummy/db/migrate/080_create_library_groups.rb index e7cbd492..7fee838b 100644 --- a/spec/dummy/db/migrate/080_create_library_groups.rb +++ b/spec/dummy/db/migrate/080_create_library_groups.rb @@ -1,8 +1,7 @@ -class CreateLibraryGroups < ActiveRecord::Migration[4.2] +class CreateLibraryGroups < ActiveRecord::Migration[5.2] def change create_table :library_groups do |t| t.string :name, null: false - t.text :display_name t.string :short_name, index: true, null: false t.text :my_networks t.text :login_banner diff --git a/spec/dummy/db/migrate/112_create_frequencies.rb b/spec/dummy/db/migrate/112_create_frequencies.rb index 465ed690..4c3e00c7 100644 --- a/spec/dummy/db/migrate/112_create_frequencies.rb +++ b/spec/dummy/db/migrate/112_create_frequencies.rb @@ -1,4 +1,4 @@ -class CreateFrequencies < ActiveRecord::Migration[4.2] +class CreateFrequencies < ActiveRecord::Migration[5.2] def change create_table :frequencies do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/117_create_form_of_works.rb b/spec/dummy/db/migrate/117_create_form_of_works.rb index 3105c62a..2573b65c 100644 --- a/spec/dummy/db/migrate/117_create_form_of_works.rb +++ b/spec/dummy/db/migrate/117_create_form_of_works.rb @@ -1,4 +1,4 @@ -class CreateFormOfWorks < ActiveRecord::Migration[4.2] +class CreateFormOfWorks < ActiveRecord::Migration[5.2] def change create_table :form_of_works do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/120_create_baskets.rb b/spec/dummy/db/migrate/120_create_baskets.rb index c3923f65..6c2968fe 100644 --- a/spec/dummy/db/migrate/120_create_baskets.rb +++ b/spec/dummy/db/migrate/120_create_baskets.rb @@ -1,4 +1,4 @@ -class CreateBaskets < ActiveRecord::Migration[4.2] +class CreateBaskets < ActiveRecord::Migration[5.2] def change create_table :baskets do |t| t.references :user, index: true diff --git a/spec/dummy/db/migrate/124_create_bookstores.rb b/spec/dummy/db/migrate/124_create_bookstores.rb index f2d32b06..0fcb7556 100644 --- a/spec/dummy/db/migrate/124_create_bookstores.rb +++ b/spec/dummy/db/migrate/124_create_bookstores.rb @@ -1,4 +1,4 @@ -class CreateBookstores < ActiveRecord::Migration[4.2] +class CreateBookstores < ActiveRecord::Migration[5.2] def change create_table :bookstores do |t| t.text :name, null: false @@ -9,7 +9,6 @@ def change t.string :fax_number t.string :url t.integer :position - t.datetime :deleted_at t.timestamps end diff --git a/spec/dummy/db/migrate/125_create_donates.rb b/spec/dummy/db/migrate/125_create_donates.rb index fff2a8a3..be03730f 100644 --- a/spec/dummy/db/migrate/125_create_donates.rb +++ b/spec/dummy/db/migrate/125_create_donates.rb @@ -1,12 +1,10 @@ -class CreateDonates < ActiveRecord::Migration[4.2] +class CreateDonates < ActiveRecord::Migration[5.2] def change create_table :donates do |t| - t.integer :agent_id, null: false - t.integer :item_id, null: false + t.references :agent, foreign_key: true, null: false + t.references :item, foreign_key: true, null: false t.timestamps end - add_index :donates, :agent_id - add_index :donates, :item_id end end diff --git a/spec/dummy/db/migrate/130_create_request_status_types.rb b/spec/dummy/db/migrate/130_create_request_status_types.rb index f34bb692..0e384f5f 100644 --- a/spec/dummy/db/migrate/130_create_request_status_types.rb +++ b/spec/dummy/db/migrate/130_create_request_status_types.rb @@ -1,4 +1,4 @@ -class CreateRequestStatusTypes < ActiveRecord::Migration[4.2] +class CreateRequestStatusTypes < ActiveRecord::Migration[5.2] def change create_table :request_status_types do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/131_create_request_types.rb b/spec/dummy/db/migrate/131_create_request_types.rb index 56a907c2..d1d7fec3 100644 --- a/spec/dummy/db/migrate/131_create_request_types.rb +++ b/spec/dummy/db/migrate/131_create_request_types.rb @@ -1,4 +1,4 @@ -class CreateRequestTypes < ActiveRecord::Migration[4.2] +class CreateRequestTypes < ActiveRecord::Migration[5.2] def change create_table :request_types do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/133_create_agent_merges.rb b/spec/dummy/db/migrate/133_create_agent_merges.rb index cb26e691..ba154a2a 100644 --- a/spec/dummy/db/migrate/133_create_agent_merges.rb +++ b/spec/dummy/db/migrate/133_create_agent_merges.rb @@ -1,4 +1,4 @@ -class CreateAgentMerges < ActiveRecord::Migration[4.2] +class CreateAgentMerges < ActiveRecord::Migration[5.2] def self.up create_table :agent_merges do |t| t.integer :agent_id, :agent_merge_list_id, null: false diff --git a/spec/dummy/db/migrate/134_create_agent_merge_lists.rb b/spec/dummy/db/migrate/134_create_agent_merge_lists.rb index 954595f8..427b9922 100644 --- a/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +++ b/spec/dummy/db/migrate/134_create_agent_merge_lists.rb @@ -1,4 +1,4 @@ -class CreateAgentMergeLists < ActiveRecord::Migration[4.2] +class CreateAgentMergeLists < ActiveRecord::Migration[5.2] def self.up create_table :agent_merge_lists do |t| t.string :title diff --git a/spec/dummy/db/migrate/149_create_message_templates.rb b/spec/dummy/db/migrate/149_create_message_templates.rb index 7a154e8f..5681fcf9 100644 --- a/spec/dummy/db/migrate/149_create_message_templates.rb +++ b/spec/dummy/db/migrate/149_create_message_templates.rb @@ -1,4 +1,4 @@ -class CreateMessageTemplates < ActiveRecord::Migration[4.2] +class CreateMessageTemplates < ActiveRecord::Migration[5.2] def self.up create_table :message_templates do |t| t.string :status, null: false diff --git a/spec/dummy/db/migrate/154_create_messages.rb b/spec/dummy/db/migrate/154_create_messages.rb index 369863c6..6b5a0f78 100644 --- a/spec/dummy/db/migrate/154_create_messages.rb +++ b/spec/dummy/db/migrate/154_create_messages.rb @@ -1,4 +1,4 @@ -class CreateMessages < ActiveRecord::Migration[4.2] +class CreateMessages < ActiveRecord::Migration[5.2] def self.up create_table :messages, force: true do |t| t.datetime :read_at diff --git a/spec/dummy/db/migrate/20080819181903_create_message_requests.rb b/spec/dummy/db/migrate/20080819181903_create_message_requests.rb index 529d55a6..e7772aef 100644 --- a/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +++ b/spec/dummy/db/migrate/20080819181903_create_message_requests.rb @@ -1,4 +1,4 @@ -class CreateMessageRequests < ActiveRecord::Migration[4.2] +class CreateMessageRequests < ActiveRecord::Migration[5.2] def self.up create_table :message_requests do |t| t.integer :sender_id diff --git a/spec/dummy/db/migrate/20080830154109_create_realizes.rb b/spec/dummy/db/migrate/20080830154109_create_realizes.rb index befa7025..8aa29516 100644 --- a/spec/dummy/db/migrate/20080830154109_create_realizes.rb +++ b/spec/dummy/db/migrate/20080830154109_create_realizes.rb @@ -1,4 +1,4 @@ -class CreateRealizes < ActiveRecord::Migration[4.2] +class CreateRealizes < ActiveRecord::Migration[5.2] def change create_table :realizes do |t| t.references :agent, null: false @@ -7,7 +7,5 @@ def change t.timestamps end - add_index :realizes, :agent_id - add_index :realizes, :expression_id end end diff --git a/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb b/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb index 900f146d..5feed5ed 100644 --- a/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +++ b/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb @@ -1,4 +1,4 @@ -class CreateExemplifies < ActiveRecord::Migration[4.2] +class CreateExemplifies < ActiveRecord::Migration[5.2] def change create_table :exemplifies do |t| t.integer :manifestation_id, null: false diff --git a/spec/dummy/db/migrate/20080905191442_create_agent_types.rb b/spec/dummy/db/migrate/20080905191442_create_agent_types.rb index 3f012445..1a6696a4 100644 --- a/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +++ b/spec/dummy/db/migrate/20080905191442_create_agent_types.rb @@ -1,4 +1,4 @@ -class CreateAgentTypes < ActiveRecord::Migration[4.2] +class CreateAgentTypes < ActiveRecord::Migration[5.2] def change create_table :agent_types do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb b/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb index 71b5a054..f21c35bc 100644 --- a/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +++ b/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb @@ -1,11 +1,10 @@ -class CreateSubscriptions < ActiveRecord::Migration[4.2] +class CreateSubscriptions < ActiveRecord::Migration[5.2] def change create_table :subscriptions do |t| t.text :title, null: false t.text :note - t.references :user, index: true + t.references :user, foreign_key: true t.references :order_list, index: true - t.datetime :deleted_at t.integer :subscribes_count, default: 0, null: false t.timestamps diff --git a/spec/dummy/db/migrate/20081006093246_create_subscribes.rb b/spec/dummy/db/migrate/20081006093246_create_subscribes.rb index cfdbf1db..8079a52e 100644 --- a/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +++ b/spec/dummy/db/migrate/20081006093246_create_subscribes.rb @@ -1,4 +1,4 @@ -class CreateSubscribes < ActiveRecord::Migration[4.2] +class CreateSubscribes < ActiveRecord::Migration[5.2] def change create_table :subscribes do |t| t.references :subscription, index: true, null: false diff --git a/spec/dummy/db/migrate/20081023092436_create_search_engines.rb b/spec/dummy/db/migrate/20081023092436_create_search_engines.rb index afc673a0..4482040f 100644 --- a/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +++ b/spec/dummy/db/migrate/20081023092436_create_search_engines.rb @@ -1,8 +1,7 @@ -class CreateSearchEngines < ActiveRecord::Migration[4.2] +class CreateSearchEngines < ActiveRecord::Migration[5.2] def change create_table :search_engines do |t| t.string :name, null: false - t.text :display_name t.string :url, null: false t.text :base_url, null: false t.text :http_method, null: false diff --git a/spec/dummy/db/migrate/20081025083323_create_countries.rb b/spec/dummy/db/migrate/20081025083323_create_countries.rb index 85e6a918..cdab9030 100644 --- a/spec/dummy/db/migrate/20081025083323_create_countries.rb +++ b/spec/dummy/db/migrate/20081025083323_create_countries.rb @@ -1,4 +1,4 @@ -class CreateCountries < ActiveRecord::Migration[4.2] +class CreateCountries < ActiveRecord::Migration[5.2] # ISO 3166 is the International Standard for country codes. # diff --git a/spec/dummy/db/migrate/20081025083905_create_languages.rb b/spec/dummy/db/migrate/20081025083905_create_languages.rb index 216b5d4d..d5f3c1af 100644 --- a/spec/dummy/db/migrate/20081025083905_create_languages.rb +++ b/spec/dummy/db/migrate/20081025083905_create_languages.rb @@ -1,4 +1,4 @@ -class CreateLanguages < ActiveRecord::Migration[4.2] +class CreateLanguages < ActiveRecord::Migration[5.2] # ISO 639 is the set of international standards that lists short codes for language names. # Note this doesn't include macrolanguages (dialects) diff --git a/spec/dummy/db/migrate/20081027150907_create_picture_files.rb b/spec/dummy/db/migrate/20081027150907_create_picture_files.rb index 1f63a6b0..7f4c14c3 100644 --- a/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +++ b/spec/dummy/db/migrate/20081027150907_create_picture_files.rb @@ -1,4 +1,4 @@ -class CreatePictureFiles < ActiveRecord::Migration[4.2] +class CreatePictureFiles < ActiveRecord::Migration[5.2] def change create_table :picture_files do |t| t.integer :picture_attachable_id diff --git a/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb b/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb index 3dc47b2f..526040d8 100644 --- a/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +++ b/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb @@ -1,20 +1,11 @@ -class CreateAgentImportFiles < ActiveRecord::Migration[4.2] +class CreateAgentImportFiles < ActiveRecord::Migration[5.2] def change create_table :agent_import_files do |t| - t.integer :parent_id - t.string :content_type - t.integer :size - t.integer :user_id + t.references :user, foreign_key: true t.text :note t.datetime :executed_at - t.string :agent_import_file_name - t.string :agent_import_content_type - t.integer :agent_import_file_size - t.datetime :agent_import_updated_at t.timestamps end - add_index :agent_import_files, :parent_id - add_index :agent_import_files, :user_id end end diff --git a/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb b/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb index 85f9006e..11130f0c 100644 --- a/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +++ b/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb @@ -1,20 +1,11 @@ -class CreateResourceImportFiles < ActiveRecord::Migration[4.2] +class CreateResourceImportFiles < ActiveRecord::Migration[5.2] def change create_table :resource_import_files do |t| - t.integer :parent_id - t.string :content_type - t.integer :size - t.integer :user_id + t.references :user, foreign_key: true t.text :note t.datetime :executed_at - t.string :resource_import_file_name - t.string :resource_import_content_type - t.integer :resource_import_file_size - t.datetime :resource_import_updated_at t.timestamps end - add_index :resource_import_files, :parent_id - add_index :resource_import_files, :user_id end end diff --git a/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb b/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb deleted file mode 100644 index 39935294..00000000 --- a/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +++ /dev/null @@ -1,15 +0,0 @@ -class AddAttachmentsPictureToPictureFile < ActiveRecord::Migration[4.2] - def self.up - add_column :picture_files, :picture_file_name, :string - add_column :picture_files, :picture_content_type, :string - add_column :picture_files, :picture_file_size, :integer - add_column :picture_files, :picture_updated_at, :datetime - end - - def self.down - remove_column :picture_files, :picture_file_name - remove_column :picture_files, :picture_content_type - remove_column :picture_files, :picture_file_size - remove_column :picture_files, :picture_updated_at - end -end diff --git a/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb b/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb deleted file mode 100644 index 7ca31c59..00000000 --- a/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +++ /dev/null @@ -1,15 +0,0 @@ -class AddAttachmentsAttachmentToManifestation < ActiveRecord::Migration[4.2] - def self.up - add_column :manifestations, :attachment_file_name, :string - add_column :manifestations, :attachment_content_type, :string - add_column :manifestations, :attachment_file_size, :integer - add_column :manifestations, :attachment_updated_at, :datetime - end - - def self.down - remove_column :manifestations, :attachment_file_name - remove_column :manifestations, :attachment_content_type - remove_column :manifestations, :attachment_file_size - remove_column :manifestations, :attachment_updated_at - end -end diff --git a/spec/dummy/db/migrate/20090719201843_create_extents.rb b/spec/dummy/db/migrate/20090719201843_create_extents.rb index 9651a571..270558a3 100644 --- a/spec/dummy/db/migrate/20090719201843_create_extents.rb +++ b/spec/dummy/db/migrate/20090719201843_create_extents.rb @@ -1,4 +1,4 @@ -class CreateExtents < ActiveRecord::Migration[4.2] +class CreateExtents < ActiveRecord::Migration[5.2] def change create_table :extents do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb b/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb index 0a97de86..db1a3b66 100644 --- a/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +++ b/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb @@ -1,4 +1,4 @@ -class CreateMediumOfPerformances < ActiveRecord::Migration[4.2] +class CreateMediumOfPerformances < ActiveRecord::Migration[5.2] def change create_table :medium_of_performances do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/20090720091429_create_content_types.rb b/spec/dummy/db/migrate/20090720091429_create_content_types.rb index 889bd3c0..f68d9440 100644 --- a/spec/dummy/db/migrate/20090720091429_create_content_types.rb +++ b/spec/dummy/db/migrate/20090720091429_create_content_types.rb @@ -1,4 +1,4 @@ -class CreateContentTypes < ActiveRecord::Migration[4.2] +class CreateContentTypes < ActiveRecord::Migration[5.2] def change create_table :content_types do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb b/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb index bceeec6f..9db70031 100644 --- a/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +++ b/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb @@ -1,4 +1,4 @@ -class CreateAgentRelationshipTypes < ActiveRecord::Migration[4.2] +class CreateAgentRelationshipTypes < ActiveRecord::Migration[5.2] def change create_table :agent_relationship_types do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb b/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb index e278bef0..4ef269cc 100644 --- a/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +++ b/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb @@ -1,4 +1,4 @@ -class AddDcndlSchema < ActiveRecord::Migration[4.2] +class AddDcndlSchema < ActiveRecord::Migration[5.2] def self.up add_column :manifestations, :title_alternative_transcription, :text add_column :agents, :full_name_alternative_transcription, :text diff --git a/spec/dummy/db/migrate/20091025080447_create_licenses.rb b/spec/dummy/db/migrate/20091025080447_create_licenses.rb index 59cdb9ee..3e128ee5 100644 --- a/spec/dummy/db/migrate/20091025080447_create_licenses.rb +++ b/spec/dummy/db/migrate/20091025080447_create_licenses.rb @@ -1,4 +1,4 @@ -class CreateLicenses < ActiveRecord::Migration[4.2] +class CreateLicenses < ActiveRecord::Migration[5.2] def change create_table :licenses do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/20091202124834_create_versions.rb b/spec/dummy/db/migrate/20091202124834_create_versions.rb index a3543a63..233b2974 100644 --- a/spec/dummy/db/migrate/20091202124834_create_versions.rb +++ b/spec/dummy/db/migrate/20091202124834_create_versions.rb @@ -1,4 +1,4 @@ -class CreateVersions < ActiveRecord::Migration[4.2] +class CreateVersions < ActiveRecord::Migration[5.2] def self.up create_table :versions do |t| t.string :item_type, null: false diff --git a/spec/dummy/db/migrate/20091214131723_create_series_statements.rb b/spec/dummy/db/migrate/20091214131723_create_series_statements.rb index c28adb14..4ea76aa8 100644 --- a/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +++ b/spec/dummy/db/migrate/20091214131723_create_series_statements.rb @@ -1,4 +1,4 @@ -class CreateSeriesStatements < ActiveRecord::Migration[4.2] +class CreateSeriesStatements < ActiveRecord::Migration[5.2] def change create_table :series_statements do |t| t.text :title diff --git a/spec/dummy/db/migrate/20100129142347_create_import_requests.rb b/spec/dummy/db/migrate/20100129142347_create_import_requests.rb index 1f813d02..b0d9d386 100644 --- a/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +++ b/spec/dummy/db/migrate/20100129142347_create_import_requests.rb @@ -1,14 +1,12 @@ -class CreateImportRequests < ActiveRecord::Migration[4.2] +class CreateImportRequests < ActiveRecord::Migration[5.2] def change create_table :import_requests do |t| t.string :isbn - t.integer :manifestation_id - t.integer :user_id + t.references :manifestation, foreign_key: true + t.references :user, foreign_key: true t.timestamps end add_index :import_requests, :isbn - add_index :import_requests, :manifestation_id - add_index :import_requests, :user_id end end diff --git a/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb b/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb index 506b3957..04e1d507 100644 --- a/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +++ b/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb @@ -1,4 +1,4 @@ -class AddAdminNetworksToLibraryGroup < ActiveRecord::Migration[4.2] +class AddAdminNetworksToLibraryGroup < ActiveRecord::Migration[5.2] def self.up add_column :library_groups, :admin_networks, :text end diff --git a/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb b/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb index 24bed392..e34eacb0 100644 --- a/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +++ b/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb @@ -1,4 +1,4 @@ -class RenameSeriesStatementTitleToOriginalTitle < ActiveRecord::Migration[4.2] +class RenameSeriesStatementTitleToOriginalTitle < ActiveRecord::Migration[5.2] def self.up rename_column :series_statements, :title, :original_title add_column :series_statements, :title_transcription, :text diff --git a/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb b/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb index 88e51ac9..a0dd282f 100644 --- a/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +++ b/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb @@ -1,4 +1,4 @@ -class AddOpeningHourToLibrary < ActiveRecord::Migration[4.2] +class AddOpeningHourToLibrary < ActiveRecord::Migration[5.2] def self.up add_column :libraries, :opening_hour, :text end diff --git a/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb b/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb index 2fedc022..da3e4d6e 100644 --- a/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +++ b/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb @@ -1,4 +1,4 @@ -class AddSeriesStatementIdentifierToSeriesStatement < ActiveRecord::Migration[4.2] +class AddSeriesStatementIdentifierToSeriesStatement < ActiveRecord::Migration[5.2] def self.up add_column :series_statements, :series_statement_identifier, :string add_index :series_statements, :series_statement_identifier diff --git a/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb b/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb index 9769418c..e2505167 100644 --- a/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +++ b/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb @@ -1,4 +1,4 @@ -class CreateManifestationRelationships < ActiveRecord::Migration[4.2] +class CreateManifestationRelationships < ActiveRecord::Migration[5.2] def change create_table :manifestation_relationships do |t| t.integer :parent_id diff --git a/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb b/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb index 32ab46c2..03c2adbf 100644 --- a/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +++ b/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb @@ -1,4 +1,4 @@ -class CreateUserHasRoles < ActiveRecord::Migration[4.2] +class CreateUserHasRoles < ActiveRecord::Migration[5.2] def change create_table :user_has_roles do |t| t.references :user, index: true, foreign_key: true, null: false diff --git a/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb b/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb index 1b6b30fc..96b0a50e 100644 --- a/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +++ b/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb @@ -1,4 +1,4 @@ -class CreateAgentRelationships < ActiveRecord::Migration[4.2] +class CreateAgentRelationships < ActiveRecord::Migration[5.2] def change create_table :agent_relationships do |t| t.integer :parent_id diff --git a/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb b/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb index bc39ae94..6bf82f7a 100644 --- a/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +++ b/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb @@ -1,4 +1,4 @@ -class CreateManifestationRelationshipTypes < ActiveRecord::Migration[4.2] +class CreateManifestationRelationshipTypes < ActiveRecord::Migration[5.2] def change create_table :manifestation_relationship_types do |t| t.string :name, null: false diff --git a/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb b/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb index 65594e26..281150de 100644 --- a/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +++ b/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb @@ -1,4 +1,4 @@ -class AddPositionToAgentRelationship < ActiveRecord::Migration[4.2] +class AddPositionToAgentRelationship < ActiveRecord::Migration[5.2] def self.up add_column :manifestation_relationships, :position, :integer add_column :agent_relationships, :position, :integer diff --git a/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb b/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb index d91b8835..165eb69b 100644 --- a/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +++ b/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb @@ -1,4 +1,4 @@ -class CreateResourceImportResults < ActiveRecord::Migration[4.2] +class CreateResourceImportResults < ActiveRecord::Migration[5.2] def change create_table :resource_import_results do |t| t.integer :resource_import_file_id diff --git a/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb b/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb index 2e1d3ac4..de8258c2 100644 --- a/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +++ b/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb @@ -1,4 +1,4 @@ -class CreateAgentImportResults < ActiveRecord::Migration[4.2] +class CreateAgentImportResults < ActiveRecord::Migration[5.2] def change create_table :agent_import_results do |t| t.integer :agent_import_file_id diff --git a/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb b/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb index 897d3f71..19b5e4fa 100644 --- a/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +++ b/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb @@ -1,4 +1,4 @@ -class AddAcquiredAtToItem < ActiveRecord::Migration[4.2] +class AddAcquiredAtToItem < ActiveRecord::Migration[5.2] def self.up add_column :items, :acquired_at, :timestamp end diff --git a/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb b/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb index ad054de1..d52da326 100644 --- a/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +++ b/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb @@ -1,4 +1,4 @@ -class AddUrlToLibraryGroup < ActiveRecord::Migration[4.2] +class AddUrlToLibraryGroup < ActiveRecord::Migration[5.2] def self.up add_column :library_groups, :url, :string, default: 'http://localhost:3000/' end diff --git a/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb b/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb index 9f714647..559eae78 100644 --- a/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +++ b/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddPubDateToManifestation < ActiveRecord::Migration[4.2] +class AddPubDateToManifestation < ActiveRecord::Migration[5.2] def self.up add_column :manifestations, :pub_date, :string end diff --git a/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb b/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb index dd6eef1e..e809eaa0 100644 --- a/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +++ b/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb @@ -1,4 +1,4 @@ -class AddBirthDateAndDeathDateToAgent < ActiveRecord::Migration[4.2] +class AddBirthDateAndDeathDateToAgent < ActiveRecord::Migration[5.2] def self.up add_column :agents, :birth_date, :string add_column :agents, :death_date, :string diff --git a/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb b/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb index 5c96a69b..0e83841f 100644 --- a/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +++ b/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb @@ -1,4 +1,4 @@ -class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration[4.2] +class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration[5.2] def self.up add_column :user_groups, :valid_period_for_new_user, :integer, default: 0, null: false add_column :user_groups, :expired_at, :timestamp diff --git a/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb b/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb index 4f2ed11e..f973dc5f 100644 --- a/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +++ b/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb @@ -1,4 +1,4 @@ -class AddEditModeToResourceImportFile < ActiveRecord::Migration[4.2] +class AddEditModeToResourceImportFile < ActiveRecord::Migration[5.2] def self.up add_column :resource_import_files, :edit_mode, :string end diff --git a/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb b/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb index 5d2f4f6c..16c61c3b 100644 --- a/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +++ b/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddEditionStringToManifestation < ActiveRecord::Migration[4.2] +class AddEditionStringToManifestation < ActiveRecord::Migration[5.2] def self.up add_column :manifestations, :edition_string, :string end diff --git a/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb b/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb index 69b35d71..573c2c5b 100644 --- a/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +++ b/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb @@ -1,4 +1,4 @@ -class AddBookstoreIdToItem < ActiveRecord::Migration[4.2] +class AddBookstoreIdToItem < ActiveRecord::Migration[5.2] def self.up add_column :items, :bookstore_id, :integer add_index :items, :bookstore_id diff --git a/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb b/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb index a3d29eb7..954d3274 100644 --- a/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +++ b/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb @@ -1,4 +1,4 @@ -class CreateSeriesStatementMergeLists < ActiveRecord::Migration[4.2] +class CreateSeriesStatementMergeLists < ActiveRecord::Migration[5.2] def change create_table :series_statement_merge_lists do |t| t.string :title diff --git a/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb b/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb index 2d6b7247..90c20ab6 100644 --- a/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +++ b/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb @@ -1,4 +1,4 @@ -class CreateSeriesStatementMerges < ActiveRecord::Migration[4.2] +class CreateSeriesStatementMerges < ActiveRecord::Migration[5.2] def change create_table :series_statement_merges do |t| t.integer :series_statement_id, null: false diff --git a/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb b/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb index 8ace06a8..f5fd5890 100644 --- a/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +++ b/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb @@ -1,4 +1,4 @@ -class AddLftAndRgtToMessage < ActiveRecord::Migration[4.2] +class AddLftAndRgtToMessage < ActiveRecord::Migration[5.2] def self.up add_column :messages, :lft, :integer add_column :messages, :rgt, :integer diff --git a/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb b/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb index f9f79e93..730a9919 100644 --- a/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +++ b/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddVolumeNumberToManifestation < ActiveRecord::Migration[4.2] +class AddVolumeNumberToManifestation < ActiveRecord::Migration[5.2] def self.up add_column :manifestations, :volume_number, :integer add_column :manifestations, :issue_number, :integer diff --git a/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb b/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb index c4a5291b..bab7047a 100644 --- a/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +++ b/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb @@ -1,4 +1,4 @@ -class AddManifestaitonIdToSeriesStatement < ActiveRecord::Migration[4.2] +class AddManifestaitonIdToSeriesStatement < ActiveRecord::Migration[5.2] def self.up add_column :series_statements, :manifestation_id, :integer add_index :series_statements, :manifestation_id diff --git a/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb b/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb index ded31fae..e9d228ec 100644 --- a/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +++ b/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb @@ -1,4 +1,4 @@ -class AddNoteToSeriesStatement < ActiveRecord::Migration[4.2] +class AddNoteToSeriesStatement < ActiveRecord::Migration[5.2] def self.up add_column :series_statements, :note, :text end diff --git a/spec/dummy/db/migrate/20111124110059_create_create_types.rb b/spec/dummy/db/migrate/20111124110059_create_create_types.rb index 7c8b78f4..8b4a1880 100644 --- a/spec/dummy/db/migrate/20111124110059_create_create_types.rb +++ b/spec/dummy/db/migrate/20111124110059_create_create_types.rb @@ -1,4 +1,4 @@ -class CreateCreateTypes < ActiveRecord::Migration[4.2] +class CreateCreateTypes < ActiveRecord::Migration[5.2] def change create_table :create_types do |t| t.string :name diff --git a/spec/dummy/db/migrate/20111124110319_create_realize_types.rb b/spec/dummy/db/migrate/20111124110319_create_realize_types.rb index 25be1121..5814b715 100644 --- a/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +++ b/spec/dummy/db/migrate/20111124110319_create_realize_types.rb @@ -1,4 +1,4 @@ -class CreateRealizeTypes < ActiveRecord::Migration[4.2] +class CreateRealizeTypes < ActiveRecord::Migration[5.2] def change create_table :realize_types do |t| t.string :name diff --git a/spec/dummy/db/migrate/20111124110355_create_produce_types.rb b/spec/dummy/db/migrate/20111124110355_create_produce_types.rb index 3408e4ba..19f8afde 100644 --- a/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +++ b/spec/dummy/db/migrate/20111124110355_create_produce_types.rb @@ -1,4 +1,4 @@ -class CreateProduceTypes < ActiveRecord::Migration[4.2] +class CreateProduceTypes < ActiveRecord::Migration[5.2] def change create_table :produce_types do |t| t.string :name diff --git a/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb b/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb index 9fff6405..0cb5431f 100644 --- a/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +++ b/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb @@ -1,4 +1,4 @@ -class AddCreateTypeToCreate < ActiveRecord::Migration[4.2] +class AddCreateTypeToCreate < ActiveRecord::Migration[5.2] def change add_column :creates, :create_type_id, :integer add_column :realizes, :realize_type_id, :integer diff --git a/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb b/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb index 17af37bb..c08e0ca7 100644 --- a/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +++ b/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb @@ -1,4 +1,4 @@ -class AddIsilToLibrary < ActiveRecord::Migration[4.2] +class AddIsilToLibrary < ActiveRecord::Migration[5.2] def change add_column :libraries, :isil, :string end diff --git a/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb b/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb index c7a612bc..5e8355db 100644 --- a/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +++ b/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb @@ -1,4 +1,4 @@ -class AddDepthToMessage < ActiveRecord::Migration[4.2] +class AddDepthToMessage < ActiveRecord::Migration[5.2] def change add_column :messages, :depth, :integer diff --git a/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb b/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb index 96991b47..747676d6 100644 --- a/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +++ b/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb @@ -1,4 +1,4 @@ -class AddTitleSubseriesTranscriptionToSeriesStatement < ActiveRecord::Migration[4.2] +class AddTitleSubseriesTranscriptionToSeriesStatement < ActiveRecord::Migration[5.2] def change add_column :series_statements, :title_subseries_transcription, :text diff --git a/spec/dummy/db/migrate/20120129014038_create_budget_types.rb b/spec/dummy/db/migrate/20120129014038_create_budget_types.rb index 9c4149ae..0aca0919 100644 --- a/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +++ b/spec/dummy/db/migrate/20120129014038_create_budget_types.rb @@ -1,4 +1,4 @@ -class CreateBudgetTypes < ActiveRecord::Migration[4.2] +class CreateBudgetTypes < ActiveRecord::Migration[5.2] def change create_table :budget_types do |t| t.string :name diff --git a/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb b/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb index dbb6ee3e..a8e0d099 100644 --- a/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +++ b/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb @@ -1,4 +1,4 @@ -class AddBudgetTypeIdToItem < ActiveRecord::Migration[4.2] +class AddBudgetTypeIdToItem < ActiveRecord::Migration[5.2] def change add_column :items, :budget_type_id, :integer diff --git a/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb b/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb index 1990bf23..b81bf263 100644 --- a/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +++ b/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddContentTypeIdToManifestation < ActiveRecord::Migration[4.2] +class AddContentTypeIdToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :content_type_id, :integer, default: 1 diff --git a/spec/dummy/db/migrate/20120319173203_create_accepts.rb b/spec/dummy/db/migrate/20120319173203_create_accepts.rb index f0c0dda5..14f8477a 100644 --- a/spec/dummy/db/migrate/20120319173203_create_accepts.rb +++ b/spec/dummy/db/migrate/20120319173203_create_accepts.rb @@ -1,4 +1,4 @@ -class CreateAccepts < ActiveRecord::Migration[4.2] +class CreateAccepts < ActiveRecord::Migration[5.2] def change create_table :accepts do |t| t.references :basket, index: true diff --git a/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb b/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb index 1f06376f..4545448f 100644 --- a/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +++ b/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddYearOfPublicationToManifestation < ActiveRecord::Migration[4.2] +class AddYearOfPublicationToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :year_of_publication, :integer end diff --git a/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb b/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb index 021f0e14..a0204edd 100644 --- a/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +++ b/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb @@ -1,4 +1,4 @@ -class AddPictureMetaToPictureFile < ActiveRecord::Migration[4.2] +class AddPictureMetaToPictureFile < ActiveRecord::Migration[5.2] def change add_column :picture_files, :picture_meta, :text end diff --git a/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb b/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb index 544c2ec4..840ddca7 100644 --- a/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +++ b/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb @@ -1,4 +1,4 @@ -class AddFingerprintToPictureFile < ActiveRecord::Migration[4.2] +class AddFingerprintToPictureFile < ActiveRecord::Migration[5.2] def change add_column :picture_files, :picture_fingerprint, :string end diff --git a/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb b/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb index 08238e7e..e8d880f8 100644 --- a/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +++ b/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb @@ -1,4 +1,4 @@ -class AddFingerprintToResourceImportFile < ActiveRecord::Migration[4.2] +class AddFingerprintToResourceImportFile < ActiveRecord::Migration[5.2] def change add_column :resource_import_files, :resource_import_fingerprint, :string end diff --git a/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb b/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb index d6b6a9c5..94bfcd15 100644 --- a/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +++ b/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb @@ -1,4 +1,4 @@ -class AddFingerprintToAgentImportFile < ActiveRecord::Migration[4.2] +class AddFingerprintToAgentImportFile < ActiveRecord::Migration[5.2] def change add_column :agent_import_files, :agent_import_fingerprint, :string end diff --git a/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb b/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb index 95ed3bd0..45cbf117 100644 --- a/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +++ b/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb @@ -1,4 +1,4 @@ -class AddErrorMessageToResourceImportFile < ActiveRecord::Migration[4.2] +class AddErrorMessageToResourceImportFile < ActiveRecord::Migration[5.2] def change add_column :resource_import_files, :error_message, :text end diff --git a/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb b/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb index 1af92074..25259137 100644 --- a/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +++ b/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb @@ -1,4 +1,4 @@ -class AddErrorMessageToAgentImportFile < ActiveRecord::Migration[4.2] +class AddErrorMessageToAgentImportFile < ActiveRecord::Migration[5.2] def change add_column :agent_import_files, :error_message, :text end diff --git a/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb b/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb deleted file mode 100644 index ecba438c..00000000 --- a/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddAttachmentMetaToManifestation < ActiveRecord::Migration[4.2] - def change - add_column :manifestations, :attachment_meta, :text - end -end diff --git a/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb b/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb index 3fdafc88..54699875 100644 --- a/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +++ b/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddMonthOfPublicationToManifestation < ActiveRecord::Migration[4.2] +class AddMonthOfPublicationToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :month_of_publication, :integer end diff --git a/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb b/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb index 41a31496..8cce1efb 100644 --- a/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +++ b/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb @@ -1,4 +1,4 @@ -class AddClosedToShelf < ActiveRecord::Migration[4.2] +class AddClosedToShelf < ActiveRecord::Migration[5.2] def change add_column :shelves, :closed, :boolean, default: false, null: false end diff --git a/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb b/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb index 64825554..5adb3970 100644 --- a/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +++ b/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb @@ -1,4 +1,4 @@ -class AddAgentIdentifierToAgent < ActiveRecord::Migration[4.2] +class AddAgentIdentifierToAgent < ActiveRecord::Migration[5.2] def change add_column :agents, :agent_identifier, :string add_index :agents, :agent_identifier diff --git a/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb b/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb index 345c0df8..4b85cf69 100644 --- a/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +++ b/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb @@ -1,4 +1,4 @@ -class AddEditModeToAgentImportFile < ActiveRecord::Migration[4.2] +class AddEditModeToAgentImportFile < ActiveRecord::Migration[5.2] def change add_column :agent_import_files, :edit_mode, :string end diff --git a/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb b/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb index 63c6d512..266e9f26 100644 --- a/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +++ b/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddFulltextContentToManifestation < ActiveRecord::Migration[4.2] +class AddFulltextContentToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :fulltext_content, :boolean end diff --git a/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb b/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb index f905d171..f4672676 100644 --- a/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +++ b/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddDoiToManifestation < ActiveRecord::Migration[4.2] +class AddDoiToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :doi, :string add_index :manifestations, :doi diff --git a/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb b/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb index 6938e49e..31ccc841 100644 --- a/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +++ b/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb @@ -1,4 +1,4 @@ -class AddAdditionalAttributesToUser < ActiveRecord::Migration[4.2] +class AddAdditionalAttributesToUser < ActiveRecord::Migration[5.2] def change add_column :users, :username, :string add_column :users, :deleted_at, :datetime diff --git a/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb b/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb index ecbb0664..318302fa 100644 --- a/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +++ b/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb @@ -1,4 +1,4 @@ -class AddLatitudeAndLongitudeToLibrary < ActiveRecord::Migration[4.2] +class AddLatitudeAndLongitudeToLibrary < ActiveRecord::Migration[5.2] def change add_column :libraries, :latitude, :float add_column :libraries, :longitude, :float diff --git a/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb b/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb index 21e655eb..fedf5c21 100644 --- a/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +++ b/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddPeriodicalToManifestation < ActiveRecord::Migration[4.2] +class AddPeriodicalToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :periodical, :boolean end diff --git a/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb b/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb index 08145915..3a3549b2 100644 --- a/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +++ b/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb @@ -1,4 +1,4 @@ -class AddCreatorStringToSeriesStatement < ActiveRecord::Migration[4.2] +class AddCreatorStringToSeriesStatement < ActiveRecord::Migration[5.2] def change add_column :series_statements, :creator_string, :text add_column :series_statements, :volume_number_string, :text diff --git a/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb b/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb index eba7efae..192cf128 100644 --- a/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +++ b/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb @@ -1,4 +1,4 @@ -class AddSeriesMasterToSeriesStatement < ActiveRecord::Migration[4.2] +class AddSeriesMasterToSeriesStatement < ActiveRecord::Migration[5.2] def change add_column :series_statements, :series_master, :boolean end diff --git a/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb b/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb index 36500ffa..1ac3c7fa 100644 --- a/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +++ b/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb @@ -1,4 +1,4 @@ -class AddRootManifestationIdToSeriesStatement < ActiveRecord::Migration[4.2] +class AddRootManifestationIdToSeriesStatement < ActiveRecord::Migration[5.2] def change add_column :series_statements, :root_manifestation_id, :integer add_index :series_statements, :root_manifestation_id diff --git a/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb b/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb index 4e76c3a1..5b3875eb 100644 --- a/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +++ b/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb @@ -1,4 +1,4 @@ -class CreateIdentifierTypes < ActiveRecord::Migration[4.2] +class CreateIdentifierTypes < ActiveRecord::Migration[5.2] def change create_table :identifier_types do |t| t.string :name diff --git a/spec/dummy/db/migrate/20130506175834_create_identifiers.rb b/spec/dummy/db/migrate/20130506175834_create_identifiers.rb index c4a73c1f..60be63d7 100644 --- a/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +++ b/spec/dummy/db/migrate/20130506175834_create_identifiers.rb @@ -1,15 +1,13 @@ -class CreateIdentifiers < ActiveRecord::Migration[4.2] +class CreateIdentifiers < ActiveRecord::Migration[5.2] def change create_table :identifiers do |t| t.string :body, null: false - t.integer :identifier_type_id, null: false - t.integer :manifestation_id + t.references :identifier_type, foreign_key: true, null: false + t.references :manifestation, foreign_key: true, null: false t.boolean :primary t.integer :position t.timestamps end - add_index :identifiers, [:body, :identifier_type_id] - add_index :identifiers, :manifestation_id end end diff --git a/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb b/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb index 9c9bef17..1d55ed5d 100644 --- a/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +++ b/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddStatementOfResponsibilityToManifestation < ActiveRecord::Migration[4.2] +class AddStatementOfResponsibilityToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :statement_of_responsibility, :text end diff --git a/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb b/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb index bd461fdf..55e2c8f1 100644 --- a/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +++ b/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb @@ -1,13 +1,9 @@ -class CreateUserImportFiles < ActiveRecord::Migration[4.2] +class CreateUserImportFiles < ActiveRecord::Migration[5.2] def change create_table :user_import_files do |t| - t.references :user, index: true + t.references :user, foreign_key: true t.text :note t.datetime :executed_at - t.string :user_import_file_name - t.string :user_import_content_type - t.integer :user_import_file_size - t.datetime :user_import_updated_at t.string :user_import_fingerprint t.string :edit_mode t.text :error_message diff --git a/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb b/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb index 10e8c806..9d7bbc16 100644 --- a/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +++ b/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb @@ -1,4 +1,4 @@ -class CreateUserImportResults < ActiveRecord::Migration[4.2] +class CreateUserImportResults < ActiveRecord::Migration[5.2] def change create_table :user_import_results do |t| t.references :user_import_file, index: true diff --git a/spec/dummy/db/migrate/20140122054321_create_profiles.rb b/spec/dummy/db/migrate/20140122054321_create_profiles.rb index c28e95ca..0bc3ff59 100644 --- a/spec/dummy/db/migrate/20140122054321_create_profiles.rb +++ b/spec/dummy/db/migrate/20140122054321_create_profiles.rb @@ -1,4 +1,4 @@ -class CreateProfiles < ActiveRecord::Migration[4.2] +class CreateProfiles < ActiveRecord::Migration[5.2] def change create_table :profiles do |t| t.references :user, index: true, foreign_key: true diff --git a/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb b/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb index fe7c4503..ec760dab 100644 --- a/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +++ b/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb @@ -1,4 +1,4 @@ -class CreateMessageTransitions < ActiveRecord::Migration[4.2] +class CreateMessageTransitions < ActiveRecord::Migration[5.2] def change create_table :message_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb b/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb index 7c329579..7d6ee9ed 100644 --- a/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +++ b/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb @@ -1,4 +1,4 @@ -class CreateMessageRequestTransitions < ActiveRecord::Migration[4.2] +class CreateMessageRequestTransitions < ActiveRecord::Migration[5.2] def change create_table :message_request_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb b/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb index 8868cb71..4416a8ac 100644 --- a/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb @@ -1,4 +1,4 @@ -class CreateResourceImportFileTransitions < ActiveRecord::Migration[4.2] +class CreateResourceImportFileTransitions < ActiveRecord::Migration[5.2] def change create_table :resource_import_file_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb b/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb index d3b90b92..71fcf28c 100644 --- a/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +++ b/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb @@ -1,4 +1,4 @@ -class CreateImportRequestTransitions < ActiveRecord::Migration[4.2] +class CreateImportRequestTransitions < ActiveRecord::Migration[5.2] def change create_table :import_request_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb b/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb index 785b7171..3e0e006d 100644 --- a/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb @@ -1,4 +1,4 @@ -class CreateAgentImportFileTransitions < ActiveRecord::Migration[4.2] +class CreateAgentImportFileTransitions < ActiveRecord::Migration[5.2] def change create_table :agent_import_file_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb b/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb index 808d7951..7e2bda65 100644 --- a/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb @@ -1,4 +1,4 @@ -class CreateUserImportFileTransitions < ActiveRecord::Migration[4.2] +class CreateUserImportFileTransitions < ActiveRecord::Migration[5.2] def change create_table :user_import_file_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb b/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb index 965193b0..50669c42 100644 --- a/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +++ b/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb @@ -1,4 +1,4 @@ -class DropEmailUniqueConstraintEnjuLeafRc10 < ActiveRecord::Migration[4.2] +class DropEmailUniqueConstraintEnjuLeafRc10 < ActiveRecord::Migration[5.2] def up remove_index :users, :email add_index :users, :email diff --git a/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb b/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb index 09bac38c..969025c5 100644 --- a/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +++ b/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb @@ -1,8 +1,7 @@ -class CreateResourceExportFiles < ActiveRecord::Migration[4.2] +class CreateResourceExportFiles < ActiveRecord::Migration[5.2] def change create_table :resource_export_files do |t| - t.integer :user_id - t.attachment :resource_export + t.references :user t.datetime :executed_at t.timestamps diff --git a/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb b/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb index c290e87e..1274b80f 100644 --- a/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +++ b/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb @@ -1,4 +1,4 @@ -class CreateResourceExportFileTransitions < ActiveRecord::Migration[4.2] +class CreateResourceExportFileTransitions < ActiveRecord::Migration[5.2] def change create_table :resource_export_file_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb b/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb index 6191c67d..94a055f6 100644 --- a/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +++ b/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb @@ -1,4 +1,4 @@ -class AddUserEncodingToUserImportFile < ActiveRecord::Migration[4.2] +class AddUserEncodingToUserImportFile < ActiveRecord::Migration[5.2] def change add_column :user_import_files, :user_encoding, :string end diff --git a/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb b/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb index c3b3098c..9b2ac187 100644 --- a/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +++ b/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb @@ -1,4 +1,4 @@ -class AddUserEncodingToAgentImportFile < ActiveRecord::Migration[4.2] +class AddUserEncodingToAgentImportFile < ActiveRecord::Migration[5.2] def change add_column :agent_import_files, :user_encoding, :string end diff --git a/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb b/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb index 3dd2ebad..965983f1 100644 --- a/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +++ b/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb @@ -1,4 +1,4 @@ -class AddUserEncodingToResourceImportFile < ActiveRecord::Migration[4.2] +class AddUserEncodingToResourceImportFile < ActiveRecord::Migration[5.2] def change add_column :resource_import_files, :user_encoding, :string end diff --git a/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb b/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb index e32524a7..2e6c8f3b 100644 --- a/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +++ b/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb @@ -1,8 +1,7 @@ -class CreateUserExportFiles < ActiveRecord::Migration[4.2] +class CreateUserExportFiles < ActiveRecord::Migration[5.2] def change create_table :user_export_files do |t| - t.references :user, index: true - t.attachment :user_export + t.references :user, foreign_key: true t.datetime :executed_at t.timestamps diff --git a/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb b/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb index c103e682..a5e90038 100644 --- a/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +++ b/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb @@ -1,4 +1,4 @@ -class CreateUserExportFileTransitions < ActiveRecord::Migration[4.2] +class CreateUserExportFileTransitions < ActiveRecord::Migration[5.2] def change create_table :user_export_file_transitions do |t| t.string :to_state diff --git a/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb b/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb index adaf9940..5434cd16 100644 --- a/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +++ b/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb @@ -1,4 +1,4 @@ -class AddBindingItemIdentifierToItem < ActiveRecord::Migration[4.2] +class AddBindingItemIdentifierToItem < ActiveRecord::Migration[5.2] def change add_column :items, :binding_item_identifier, :string add_column :items, :binding_call_number, :string diff --git a/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb b/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb index e4075bf1..e3fd9547 100644 --- a/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +++ b/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb @@ -1,4 +1,4 @@ -class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration[4.2] +class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration[5.2] def change add_reference :user_import_files, :default_library end diff --git a/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb b/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb index 45fef22d..383d2c89 100644 --- a/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +++ b/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb @@ -1,4 +1,4 @@ -class AddDefaultUserGroupIdToUserImportFile < ActiveRecord::Migration[4.2] +class AddDefaultUserGroupIdToUserImportFile < ActiveRecord::Migration[5.2] def change add_reference :user_import_files, :default_user_group end diff --git a/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb b/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb index ecaaa46f..c5b1bc2b 100644 --- a/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +++ b/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb @@ -1,4 +1,4 @@ -class AddDefaultShelfIdToResourceImportFile < ActiveRecord::Migration[4.2] +class AddDefaultShelfIdToResourceImportFile < ActiveRecord::Migration[5.2] def change add_column :resource_import_files, :default_shelf_id, :integer end diff --git a/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb b/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb index 3c250148..3c660c12 100644 --- a/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +++ b/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb @@ -1,4 +1,4 @@ -class AddManifestationIdToItem < ActiveRecord::Migration[4.2] +class AddManifestationIdToItem < ActiveRecord::Migration[5.2] def change add_column :items, :manifestation_id, :integer add_index :items, :manifestation_id diff --git a/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb b/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb index 561c4e4e..4d9f62c2 100644 --- a/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +++ b/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb @@ -1,4 +1,4 @@ -class AddExpiredAtToProfile < ActiveRecord::Migration[4.2] +class AddExpiredAtToProfile < ActiveRecord::Migration[5.2] def change add_column :profiles, :expired_at, :datetime end diff --git a/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb b/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb index b002c1d4..5e43d20f 100644 --- a/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +++ b/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddPublicationPlaceToManifestation < ActiveRecord::Migration[4.2] +class AddPublicationPlaceToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :publication_place, :text end diff --git a/spec/dummy/db/migrate/20140821151023_create_colors.rb b/spec/dummy/db/migrate/20140821151023_create_colors.rb index e04210f2..3e83141c 100644 --- a/spec/dummy/db/migrate/20140821151023_create_colors.rb +++ b/spec/dummy/db/migrate/20140821151023_create_colors.rb @@ -1,4 +1,4 @@ -class CreateColors < ActiveRecord::Migration[4.2] +class CreateColors < ActiveRecord::Migration[5.2] def change create_table :colors do |t| t.references :library_group, index: true diff --git a/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb b/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb index f6f513f3..14f2b6ed 100644 --- a/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +++ b/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb @@ -1,4 +1,4 @@ -class AddErrorMessageToResourceImportResult < ActiveRecord::Migration[4.2] +class AddErrorMessageToResourceImportResult < ActiveRecord::Migration[5.2] def change add_column :resource_import_results, :error_message, :text end diff --git a/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb b/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb index 08fcf89b..4560011e 100644 --- a/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +++ b/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddExtentToManifestation < ActiveRecord::Migration[4.2] +class AddExtentToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :extent, :text end diff --git a/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb b/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb index 1750f2f1..0ff5be12 100644 --- a/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +++ b/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb @@ -1,4 +1,4 @@ -class AddDimensionsToManifestation < ActiveRecord::Migration[4.2] +class AddDimensionsToManifestation < ActiveRecord::Migration[5.2] def change add_column :manifestations, :dimensions, :text end diff --git a/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb b/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb index 54c781c6..83ce55a9 100644 --- a/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +++ b/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb @@ -1,4 +1,4 @@ -class RenameManifestationPeriodicalToSerial < ActiveRecord::Migration[4.2] +class RenameManifestationPeriodicalToSerial < ActiveRecord::Migration[5.2] def up rename_column :manifestations, :periodical, :serial end diff --git a/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb b/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb index 82d84ae5..31b2cab7 100644 --- a/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +++ b/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb @@ -1,4 +1,4 @@ -class AddFullNameTranscriptionToProfile < ActiveRecord::Migration[4.2] +class AddFullNameTranscriptionToProfile < ActiveRecord::Migration[5.2] def change add_column :profiles, :full_name_transcription, :text end diff --git a/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb b/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb index 0dcb236f..4e83e871 100644 --- a/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +++ b/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb @@ -1,4 +1,4 @@ -class AddDateOfBirthToProfile < ActiveRecord::Migration[4.2] +class AddDateOfBirthToProfile < ActiveRecord::Migration[5.2] def change add_column :profiles, :date_of_birth, :datetime end diff --git a/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb b/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb index 548791e5..7bdd914c 100644 --- a/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +++ b/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration[4.2] +class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration[5.2] def change add_foreign_key :items, :manifestations end diff --git a/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb b/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb index e262ea27..f9c420bb 100644 --- a/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +++ b/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb @@ -1,4 +1,4 @@ -class AddSettingsToLibraryGroup < ActiveRecord::Migration[4.2] +class AddSettingsToLibraryGroup < ActiveRecord::Migration[5.2] def change add_column :library_groups, :settings, :text end diff --git a/spec/dummy/db/migrate/20150421023923_create_identities.rb b/spec/dummy/db/migrate/20150421023923_create_identities.rb index 7808507c..3d5096f5 100644 --- a/spec/dummy/db/migrate/20150421023923_create_identities.rb +++ b/spec/dummy/db/migrate/20150421023923_create_identities.rb @@ -1,4 +1,4 @@ -class CreateIdentities < ActiveRecord::Migration[4.2] +class CreateIdentities < ActiveRecord::Migration[5.2] def change create_table :identities do |t| t.string :name diff --git a/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb b/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb index f4e237da..6b795334 100644 --- a/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +++ b/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb @@ -1,4 +1,4 @@ -class AddErrorMessageToUserImportResult < ActiveRecord::Migration[4.2] +class AddErrorMessageToUserImportResult < ActiveRecord::Migration[5.2] def change add_column :user_import_results, :error_message, :text end diff --git a/spec/dummy/db/migrate/20150924115059_create_withdraws.rb b/spec/dummy/db/migrate/20150924115059_create_withdraws.rb index 14a2e6a2..2de1f252 100644 --- a/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +++ b/spec/dummy/db/migrate/20150924115059_create_withdraws.rb @@ -1,4 +1,4 @@ -class CreateWithdraws < ActiveRecord::Migration[4.2] +class CreateWithdraws < ActiveRecord::Migration[5.2] def change create_table :withdraws do |t| t.references :basket, index: true diff --git a/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb b/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb index 96b81229..5a737e70 100644 --- a/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +++ b/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb @@ -1,4 +1,4 @@ -class AddProfileIdToAgent < ActiveRecord::Migration[4.2] +class AddProfileIdToAgent < ActiveRecord::Migration[5.2] def change add_column :agents, :profile_id, :integer add_index :agents, :profile_id diff --git a/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb b/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb index 33e3b0fb..c113e824 100644 --- a/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +++ b/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb @@ -1,4 +1,4 @@ -class AddProviderToIdentity < ActiveRecord::Migration[4.2] +class AddProviderToIdentity < ActiveRecord::Migration[5.2] def change add_column :identities, :provider, :string end diff --git a/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb b/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb index 60509c53..4ec21d2f 100644 --- a/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +++ b/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb @@ -1,5 +1,5 @@ # This migration comes from enju_library_engine (originally 20151213070943) -class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2] +class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[5.2] def up if defined?(Globalize) LibraryGroup.create_translation_table!({ diff --git a/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb b/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb index 15c5fc42..b05dcebd 100644 --- a/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +++ b/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb @@ -1,5 +1,5 @@ # This migration comes from enju_library_engine (originally 20151213072705) -class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[4.2] +class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[5.2] def up if defined?(Globalize) LibraryGroup.add_translation_fields! footer_banner: :text diff --git a/spec/dummy/db/migrate/20160319144230_create_issn_records.rb b/spec/dummy/db/migrate/20160319144230_create_issn_records.rb new file mode 100644 index 00000000..981b5aa7 --- /dev/null +++ b/spec/dummy/db/migrate/20160319144230_create_issn_records.rb @@ -0,0 +1,11 @@ +class CreateIssnRecords < ActiveRecord::Migration[5.2] + def change + create_table :issn_records do |t| + t.string :body, index: {unique: true}, null: false + t.string :issn_type + t.string :source + + t.timestamps + end + end +end diff --git a/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb b/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb new file mode 100644 index 00000000..f1c94583 --- /dev/null +++ b/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb @@ -0,0 +1,11 @@ +class CreateIsbnRecords < ActiveRecord::Migration[5.2] + def change + create_table :isbn_records do |t| + t.string :body, index: {unique: true}, null: false + t.string :isbn_type + t.string :source + + t.timestamps + end + end +end diff --git a/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb b/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb index fc548056..288402b8 100644 --- a/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +++ b/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb @@ -1,4 +1,4 @@ -class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[4.2] +class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[5.2] def change add_column :library_groups, :html_snippet, :text end diff --git a/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb b/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb index 09833bec..ccfeaaf1 100644 --- a/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration[5.2] def up add_column :user_import_file_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb b/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb index cf2ae6ad..d96fab61 100644 --- a/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +++ b/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration[5.2] def up add_column :user_export_file_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb b/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb index 7a4958bc..97ebe249 100644 --- a/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +++ b/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToMessageTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToMessageTransitions < ActiveRecord::Migration[5.2] def up add_column :message_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb b/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb index c9ad6d2c..6a8fefe2 100644 --- a/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +++ b/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration[5.2] def up add_column :import_request_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb b/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb index 349a4103..a1e678e8 100644 --- a/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToResourceImportFileTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToResourceImportFileTransitions < ActiveRecord::Migration[5.2] def up add_column :resource_import_file_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb b/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb index f24bf0bb..9abb34d2 100644 --- a/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +++ b/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration[5.2] def up add_column :resource_export_file_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb b/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb index 0231ada0..a85ab263 100644 --- a/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToAgentImportFileTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToAgentImportFileTransitions < ActiveRecord::Migration[5.2] def up add_column :agent_import_file_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb b/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb index e939d9d7..1742a3a4 100644 --- a/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +++ b/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb @@ -1,4 +1,4 @@ -class AddPictureWidthToPictureFile < ActiveRecord::Migration[4.2] +class AddPictureWidthToPictureFile < ActiveRecord::Migration[5.2] def change add_column :picture_files, :picture_width, :integer add_column :picture_files, :picture_height, :integer diff --git a/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb b/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb index e432466b..db93abc4 100644 --- a/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +++ b/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb @@ -1,4 +1,4 @@ -class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[4.2] +class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[5.2] def change add_column :library_groups, :max_number_of_results, :integer, default: 500 end diff --git a/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb b/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb index a9d00155..33f447b4 100644 --- a/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +++ b/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb @@ -1,4 +1,4 @@ -class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration[4.2] +class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration[5.2] def change add_column :library_groups, :family_name_first, :boolean, default: true end diff --git a/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb b/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb index a5b3aea4..ed9b938b 100644 --- a/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +++ b/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb @@ -1,4 +1,4 @@ -class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration[4.2] +class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration[5.2] def change add_column :library_groups, :pub_year_facet_range_interval, :integer, default: 10 end diff --git a/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb b/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb index ec68741b..578119a3 100644 --- a/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +++ b/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb @@ -1,4 +1,4 @@ -class AddUserIdToLibraryGroup < ActiveRecord::Migration[4.2] +class AddUserIdToLibraryGroup < ActiveRecord::Migration[5.2] def change add_reference :library_groups, :user, index: true, foreign_key: true end diff --git a/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb b/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb index a597517f..37a12a44 100644 --- a/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +++ b/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb @@ -1,4 +1,4 @@ -class AddMostRecentToMessageRequestTransitions < ActiveRecord::Migration[4.2] +class AddMostRecentToMessageRequestTransitions < ActiveRecord::Migration[5.2] def up add_column :message_request_transitions, :most_recent, :boolean, null: true end diff --git a/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb b/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb deleted file mode 100644 index e588d4a6..00000000 --- a/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +++ /dev/null @@ -1,11 +0,0 @@ -class AddAttachmentAttachmentToCarrierTypes < ActiveRecord::Migration[4.2] - def self.up - change_table :carrier_types do |t| - t.attachment :attachment - end - end - - def self.down - remove_attachment :carrier_types, :attachment - end -end diff --git a/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb b/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb new file mode 100644 index 00000000..1fcd1b16 --- /dev/null +++ b/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb @@ -0,0 +1,11 @@ +class CreateIssnRecordAndManifestations < ActiveRecord::Migration[5.2] + def change + create_table :issn_record_and_manifestations do |t| + t.references :issn_record, foreign_key: true, on_delete: :cascade, null: false + t.references :manifestation, foreign_key: true, on_delete: :cascade, null: false + t.integer :position + + t.timestamps + end + end +end diff --git a/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb b/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb new file mode 100644 index 00000000..c73490be --- /dev/null +++ b/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb @@ -0,0 +1,11 @@ +class CreateIsbnRecordAndManifestations < ActiveRecord::Migration[5.2] + def change + create_table :isbn_record_and_manifestations do |t| + t.references :isbn_record, foreign_key: true, on_delete: :cascade, null: false + t.references :manifestation, foreign_key: true, null: false, on_delete: :cascade + t.integer :position + + t.timestamps + end + end +end diff --git a/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb b/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb index 67aebe51..edbf9564 100644 --- a/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +++ b/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb @@ -1,4 +1,4 @@ -class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[4.2] +class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[5.2] def change add_column :library_groups, :csv_charset_conversion, :boolean, null: false, default: false end diff --git a/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb b/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb deleted file mode 100644 index 437d1348..00000000 --- a/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration[4.2] - def change - add_attachment :library_groups, :header_logo - end -end diff --git a/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb b/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb index cd95aa05..e0ee6ad8 100644 --- a/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +++ b/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb @@ -1,4 +1,4 @@ -class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration[4.2] +class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration[5.2] def change change_column_null :items, :manifestation_id, false end diff --git a/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb b/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb index 7ff22cdf..5dc37b98 100644 --- a/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +++ b/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb @@ -1,4 +1,4 @@ -class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[4.2] +class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[5.2] def change rename_column :library_groups, :login_banner, :old_login_banner end diff --git a/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb b/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb index ba9c31fb..e663d291 100644 --- a/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +++ b/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration[4.2] +class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration[5.2] def change add_foreign_key :libraries, :library_groups, null: false end diff --git a/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb b/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb index 7e350fd7..e4a8c21a 100644 --- a/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +++ b/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb @@ -1,4 +1,4 @@ -class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[4.2] +class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[5.2] def change add_column :library_groups, :header_logo_meta, :text end diff --git a/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb b/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb index 93985920..9ec150ec 100644 --- a/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb @@ -1,4 +1,4 @@ -class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[4.2] +class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up diff --git a/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb b/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb index 68e294e9..2b8967a7 100644 --- a/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +++ b/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb @@ -1,4 +1,4 @@ -class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[4.2] +class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up diff --git a/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb b/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb index ee623203..fb4a75cf 100644 --- a/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb @@ -1,4 +1,4 @@ -class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration[4.2] +class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up diff --git a/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb b/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb index 42c342e3..a0b7fdcd 100644 --- a/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +++ b/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb @@ -1,4 +1,4 @@ -class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration[4.2] +class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up diff --git a/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb b/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb index 3367008f..b9f151b6 100644 --- a/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +++ b/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb @@ -1,4 +1,4 @@ -class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration[4.2] +class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up diff --git a/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb b/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb index b030fb0b..54a24156 100644 --- a/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +++ b/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb @@ -1,4 +1,4 @@ -class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[4.2] +class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[5.2] disable_ddl_transaction! def up diff --git a/spec/dummy/db/migrate/20190102034126_create_doi_records.rb b/spec/dummy/db/migrate/20190102034126_create_doi_records.rb new file mode 100644 index 00000000..169cbbdf --- /dev/null +++ b/spec/dummy/db/migrate/20190102034126_create_doi_records.rb @@ -0,0 +1,13 @@ +class CreateDoiRecords < ActiveRecord::Migration[5.2] + def change + create_table :doi_records do |t| + t.string :body, index: {unique: true}, null: false + t.string :display_body, null: false + t.string :source + t.jsonb :response, default: {}, null: false + t.references :manifestation, foreign_key: true, null: false + + t.timestamps + end + end +end diff --git a/spec/dummy/db/migrate/20190311154610_create_periodicals.rb b/spec/dummy/db/migrate/20190311154610_create_periodicals.rb new file mode 100644 index 00000000..bf236dbe --- /dev/null +++ b/spec/dummy/db/migrate/20190311154610_create_periodicals.rb @@ -0,0 +1,10 @@ +class CreatePeriodicals < ActiveRecord::Migration[5.2] + def change + create_table :periodicals do |t| + t.text :original_title, null: false + t.references :frequency, foreign_key: true, null: false + + t.timestamps + end + end +end diff --git a/spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb b/spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb new file mode 100644 index 00000000..8480b37b --- /dev/null +++ b/spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb @@ -0,0 +1,11 @@ +class CreatePeriodicalAndManifestations < ActiveRecord::Migration[5.2] + def change + create_table :periodical_and_manifestations do |t| + t.references :periodical, foreign_key: true, null: false + t.references :manifestation, foreign_key: true, null: false + t.boolean :periodical_master, default: false, null: false, index: {where: 'periodical_master IS true', unique: true} + + t.timestamps + end + end +end diff --git a/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb b/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb new file mode 100644 index 00000000..26e99213 --- /dev/null +++ b/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb @@ -0,0 +1,5 @@ +class AddMemoToManifestation < ActiveRecord::Migration[5.2] + def change + add_column :manifestations, :memo, :text + end +end diff --git a/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb b/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb new file mode 100644 index 00000000..bfcf5bd8 --- /dev/null +++ b/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb @@ -0,0 +1,5 @@ +class AddMemoToItem < ActiveRecord::Migration[5.2] + def change + add_column :items, :memo, :text + end +end diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb index d70c17c4..abd407a1 100644 --- a/spec/dummy/db/schema.rb +++ b/spec/dummy/db/schema.rb @@ -10,112 +10,104 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2019_07_13_115451) do +ActiveRecord::Schema.define(version: 2019_08_18_075628) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" - create_table "accepts", id: :serial, force: :cascade do |t| - t.integer "basket_id" - t.integer "item_id" - t.integer "librarian_id" - t.datetime "created_at" - t.datetime "updated_at" + create_table "accepts", force: :cascade do |t| + t.bigint "basket_id" + t.bigint "item_id" + t.bigint "librarian_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["basket_id"], name: "index_accepts_on_basket_id" t.index ["item_id"], name: "index_accepts_on_item_id" t.index ["librarian_id"], name: "index_accepts_on_librarian_id" end - create_table "agent_import_file_transitions", id: :serial, force: :cascade do |t| + create_table "agent_import_file_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" t.integer "agent_import_file_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent", null: false t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id" t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true end - create_table "agent_import_files", id: :serial, force: :cascade do |t| - t.integer "parent_id" - t.string "content_type" - t.integer "size" - t.integer "user_id" + create_table "agent_import_files", force: :cascade do |t| + t.bigint "user_id" t.text "note" t.datetime "executed_at" - t.string "agent_import_file_name" - t.string "agent_import_content_type" - t.integer "agent_import_file_size" - t.datetime "agent_import_updated_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "agent_import_fingerprint" t.text "error_message" t.string "edit_mode" t.string "user_encoding" - t.index ["parent_id"], name: "index_agent_import_files_on_parent_id" t.index ["user_id"], name: "index_agent_import_files_on_user_id" end - create_table "agent_import_results", id: :serial, force: :cascade do |t| + create_table "agent_import_results", force: :cascade do |t| t.integer "agent_import_file_id" t.integer "agent_id" t.text "body" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "agent_merge_lists", id: :serial, force: :cascade do |t| + create_table "agent_merge_lists", force: :cascade do |t| t.string "title" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "agent_merges", id: :serial, force: :cascade do |t| + create_table "agent_merges", force: :cascade do |t| t.integer "agent_id", null: false t.integer "agent_merge_list_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["agent_id"], name: "index_agent_merges_on_agent_id" t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id" end - create_table "agent_relationship_types", id: :serial, force: :cascade do |t| + create_table "agent_relationship_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "agent_relationships", id: :serial, force: :cascade do |t| + create_table "agent_relationships", force: :cascade do |t| t.integer "parent_id" t.integer "child_id" t.integer "agent_relationship_type_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "position" t.index ["child_id"], name: "index_agent_relationships_on_child_id" t.index ["parent_id"], name: "index_agent_relationships_on_parent_id" end - create_table "agent_types", id: :serial, force: :cascade do |t| + create_table "agent_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "agents", id: :serial, force: :cascade do |t| + create_table "agents", force: :cascade do |t| t.string "last_name" t.string "middle_name" t.string "first_name" @@ -127,9 +119,8 @@ t.string "full_name" t.text "full_name_transcription" t.text "full_name_alternative" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "zip_code_1" t.string "zip_code_2" t.text "address_1" @@ -170,16 +161,16 @@ t.index ["required_role_id"], name: "index_agents_on_required_role_id" end - create_table "baskets", id: :serial, force: :cascade do |t| - t.integer "user_id" + create_table "baskets", force: :cascade do |t| + t.bigint "user_id" t.text "note" t.integer "lock_version", default: 0, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["user_id"], name: "index_baskets_on_user_id" end - create_table "bookstores", id: :serial, force: :cascade do |t| + create_table "bookstores", force: :cascade do |t| t.text "name", null: false t.string "zip_code" t.text "address" @@ -188,51 +179,46 @@ t.string "fax_number" t.string "url" t.integer "position" - t.datetime "deleted_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "budget_types", id: :serial, force: :cascade do |t| + create_table "budget_types", force: :cascade do |t| t.string "name" t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "carrier_types", id: :serial, force: :cascade do |t| + create_table "carrier_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" - t.string "attachment_file_name" - t.string "attachment_content_type" - t.bigint "attachment_file_size" - t.datetime "attachment_updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "classification_types", id: :serial, force: :cascade do |t| + create_table "classification_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "classifications", id: :serial, force: :cascade do |t| + create_table "classifications", force: :cascade do |t| t.integer "parent_id" t.string "category", null: false t.text "note" t.integer "classification_type_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "lft" t.integer "rgt" t.integer "manifestation_id" @@ -244,27 +230,27 @@ t.index ["parent_id"], name: "index_classifications_on_parent_id" end - create_table "colors", id: :serial, force: :cascade do |t| - t.integer "library_group_id" + create_table "colors", force: :cascade do |t| + t.bigint "library_group_id" t.string "property" t.string "code" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["library_group_id"], name: "index_colors_on_library_group_id" end - create_table "content_types", id: :serial, force: :cascade do |t| + create_table "content_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "countries", id: :serial, force: :cascade do |t| + create_table "countries", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.string "alpha_2" @@ -278,101 +264,113 @@ t.index ["numeric_3"], name: "index_countries_on_numeric_3" end - create_table "create_types", id: :serial, force: :cascade do |t| + create_table "create_types", force: :cascade do |t| t.string "name" t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "creates", id: :serial, force: :cascade do |t| - t.integer "agent_id", null: false - t.integer "work_id", null: false + create_table "creates", force: :cascade do |t| + t.bigint "agent_id", null: false + t.bigint "work_id", null: false t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "create_type_id" t.index ["agent_id"], name: "index_creates_on_agent_id" t.index ["work_id"], name: "index_creates_on_work_id" end - create_table "donates", id: :serial, force: :cascade do |t| - t.integer "agent_id", null: false - t.integer "item_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + create_table "doi_records", force: :cascade do |t| + t.string "body", null: false + t.string "display_body", null: false + t.string "source" + t.jsonb "response", default: {}, null: false + t.bigint "manifestation_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["body"], name: "index_doi_records_on_body", unique: true + t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id" + end + + create_table "donates", force: :cascade do |t| + t.bigint "agent_id", null: false + t.bigint "item_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["agent_id"], name: "index_donates_on_agent_id" t.index ["item_id"], name: "index_donates_on_item_id" end - create_table "exemplifies", id: :serial, force: :cascade do |t| + create_table "exemplifies", force: :cascade do |t| t.integer "manifestation_id", null: false t.integer "item_id", null: false t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id" end - create_table "extents", id: :serial, force: :cascade do |t| + create_table "extents", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "form_of_works", id: :serial, force: :cascade do |t| + create_table "form_of_works", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "frequencies", id: :serial, force: :cascade do |t| + create_table "frequencies", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "identifier_types", id: :serial, force: :cascade do |t| + create_table "identifier_types", force: :cascade do |t| t.string "name" t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "identifiers", id: :serial, force: :cascade do |t| + create_table "identifiers", force: :cascade do |t| t.string "body", null: false - t.integer "identifier_type_id", null: false - t.integer "manifestation_id" + t.bigint "identifier_type_id", null: false + t.bigint "manifestation_id", null: false t.boolean "primary" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" - t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["identifier_type_id"], name: "index_identifiers_on_identifier_type_id" t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id" end - create_table "identities", id: :serial, force: :cascade do |t| + create_table "identities", force: :cascade do |t| t.string "name" t.string "email" t.string "password_digest" - t.integer "profile_id" + t.bigint "profile_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "provider" @@ -381,36 +379,73 @@ t.index ["profile_id"], name: "index_identities_on_profile_id" end - create_table "import_request_transitions", id: :serial, force: :cascade do |t| + create_table "import_request_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" t.integer "import_request_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent", null: false t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id" t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true end - create_table "import_requests", id: :serial, force: :cascade do |t| + create_table "import_requests", force: :cascade do |t| t.string "isbn" - t.integer "manifestation_id" - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.bigint "manifestation_id" + t.bigint "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["isbn"], name: "index_import_requests_on_isbn" t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id" t.index ["user_id"], name: "index_import_requests_on_user_id" end - create_table "items", id: :serial, force: :cascade do |t| + create_table "isbn_record_and_manifestations", force: :cascade do |t| + t.bigint "isbn_record_id", null: false + t.bigint "manifestation_id", null: false + t.integer "position" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["isbn_record_id"], name: "index_isbn_record_and_manifestations_on_isbn_record_id" + t.index ["manifestation_id"], name: "index_isbn_record_and_manifestations_on_manifestation_id" + end + + create_table "isbn_records", force: :cascade do |t| + t.string "body", null: false + t.string "isbn_type" + t.string "source" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["body"], name: "index_isbn_records_on_body", unique: true + end + + create_table "issn_record_and_manifestations", force: :cascade do |t| + t.bigint "issn_record_id", null: false + t.bigint "manifestation_id", null: false + t.integer "position" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["issn_record_id"], name: "index_issn_record_and_manifestations_on_issn_record_id" + t.index ["manifestation_id"], name: "index_issn_record_and_manifestations_on_manifestation_id" + end + + create_table "issn_records", force: :cascade do |t| + t.string "body", null: false + t.string "issn_type" + t.string "source" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["body"], name: "index_issn_records_on_body", unique: true + end + + create_table "items", force: :cascade do |t| t.string "call_number" t.string "item_identifier" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "shelf_id", default: 1, null: false t.boolean "include_supplements", default: false, null: false t.text "note" @@ -426,6 +461,7 @@ t.string "binding_call_number" t.datetime "binded_at" t.integer "manifestation_id", null: false + t.text "memo" t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier" t.index ["bookstore_id"], name: "index_items_on_bookstore_id" t.index ["item_identifier"], name: "index_items_on_item_identifier" @@ -434,7 +470,7 @@ t.index ["shelf_id"], name: "index_items_on_shelf_id" end - create_table "languages", id: :serial, force: :cascade do |t| + create_table "languages", force: :cascade do |t| t.string "name", null: false t.string "native_name" t.text "display_name" @@ -450,9 +486,8 @@ t.index ["name"], name: "index_languages_on_name", unique: true end - create_table "libraries", id: :serial, force: :cascade do |t| + create_table "libraries", force: :cascade do |t| t.string "name", null: false - t.text "display_name" t.string "short_display_name", null: false t.string "zip_code" t.text "street" @@ -464,33 +499,32 @@ t.text "note" t.integer "call_number_rows", default: 1, null: false t.string "call_number_delimiter", default: "|", null: false - t.integer "library_group_id", null: false + t.bigint "library_group_id", null: false t.integer "users_count", default: 0, null: false t.integer "position" - t.integer "country_id" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.bigint "country_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "opening_hour" t.string "isil" t.float "latitude" t.float "longitude" t.jsonb "display_name_translations", default: {}, null: false + t.index ["country_id"], name: "index_libraries_on_country_id" t.index ["library_group_id"], name: "index_libraries_on_library_group_id" t.index ["name"], name: "index_libraries_on_name" end - create_table "library_groups", id: :serial, force: :cascade do |t| + create_table "library_groups", force: :cascade do |t| t.string "name", null: false - t.text "display_name" t.string "short_name", null: false t.text "my_networks" t.text "old_login_banner" t.text "note" t.integer "country_id" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "admin_networks" t.string "url", default: "http://localhost:3000/" t.text "settings" @@ -498,12 +532,8 @@ t.integer "max_number_of_results", default: 500 t.boolean "family_name_first", default: true t.integer "pub_year_facet_range_interval", default: 10 - t.integer "user_id" + t.bigint "user_id" t.boolean "csv_charset_conversion", default: false, null: false - t.string "header_logo_file_name" - t.string "header_logo_content_type" - t.bigint "header_logo_file_size" - t.datetime "header_logo_updated_at" t.text "header_logo_meta" t.jsonb "display_name_translations", default: {}, null: false t.jsonb "login_banner_translations", default: {}, null: false @@ -512,38 +542,38 @@ t.index ["user_id"], name: "index_library_groups_on_user_id" end - create_table "licenses", id: :serial, force: :cascade do |t| + create_table "licenses", force: :cascade do |t| t.string "name", null: false t.string "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "manifestation_relationship_types", id: :serial, force: :cascade do |t| + create_table "manifestation_relationship_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "manifestation_relationships", id: :serial, force: :cascade do |t| + create_table "manifestation_relationships", force: :cascade do |t| t.integer "parent_id" t.integer "child_id" t.integer "manifestation_relationship_type_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "position" t.index ["child_id"], name: "index_manifestation_relationships_on_child_id" t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id" end - create_table "manifestations", id: :serial, force: :cascade do |t| + create_table "manifestations", force: :cascade do |t| t.text "original_title", null: false t.text "title_alternative" t.text "title_transcription" @@ -551,9 +581,8 @@ t.string "manifestation_identifier" t.datetime "date_of_publication" t.datetime "date_copyrighted" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "access_address" t.integer "language_id", default: 1, null: false t.integer "carrier_type_id", default: 1, null: false @@ -575,10 +604,6 @@ t.integer "required_score", default: 0, null: false t.integer "frequency_id", default: 1, null: false t.boolean "subscription_master", default: false, null: false - t.string "attachment_file_name" - t.string "attachment_content_type" - t.integer "attachment_file_size" - t.datetime "attachment_updated_at" t.text "title_alternative_transcription" t.text "description" t.text "abstract" @@ -594,7 +619,6 @@ t.integer "serial_number" t.integer "content_type_id", default: 1 t.integer "year_of_publication" - t.text "attachment_meta" t.integer "month_of_publication" t.boolean "fulltext_content" t.string "doi" @@ -603,6 +627,7 @@ t.text "publication_place" t.text "extent" t.text "dimensions" + t.text "memo" t.index ["access_address"], name: "index_manifestations_on_access_address" t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication" t.index ["doi"], name: "index_manifestations_on_doi" @@ -610,63 +635,63 @@ t.index ["updated_at"], name: "index_manifestations_on_updated_at" end - create_table "medium_of_performances", id: :serial, force: :cascade do |t| + create_table "medium_of_performances", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "message_request_transitions", id: :serial, force: :cascade do |t| + create_table "message_request_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" t.integer "message_request_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent" t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id" t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true end - create_table "message_requests", id: :serial, force: :cascade do |t| + create_table "message_requests", force: :cascade do |t| t.integer "sender_id" t.integer "receiver_id" t.integer "message_template_id" t.datetime "sent_at" t.datetime "deleted_at" t.text "body" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "message_templates", id: :serial, force: :cascade do |t| + create_table "message_templates", force: :cascade do |t| t.string "status", null: false t.text "title", null: false t.text "body", null: false t.integer "position" t.string "locale", default: "en" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["status"], name: "index_message_templates_on_status", unique: true end - create_table "message_transitions", id: :serial, force: :cascade do |t| + create_table "message_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" t.integer "message_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent" t.index ["message_id"], name: "index_message_transitions_on_message_id" t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true end - create_table "messages", id: :serial, force: :cascade do |t| + create_table "messages", force: :cascade do |t| t.datetime "read_at" t.integer "receiver_id" t.integer "sender_id" @@ -674,8 +699,8 @@ t.text "body" t.integer "message_request_id" t.integer "parent_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "lft" t.integer "rgt" t.integer "depth" @@ -685,29 +710,44 @@ t.index ["sender_id"], name: "index_messages_on_sender_id" end - create_table "owns", id: :serial, force: :cascade do |t| - t.integer "agent_id", null: false - t.integer "item_id", null: false + create_table "owns", force: :cascade do |t| + t.bigint "agent_id", null: false + t.bigint "item_id", null: false t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["agent_id"], name: "index_owns_on_agent_id" t.index ["item_id"], name: "index_owns_on_item_id" end - create_table "picture_files", id: :serial, force: :cascade do |t| + create_table "periodical_and_manifestations", force: :cascade do |t| + t.bigint "periodical_id", null: false + t.bigint "manifestation_id", null: false + t.boolean "periodical_master", default: false, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["manifestation_id"], name: "index_periodical_and_manifestations_on_manifestation_id" + t.index ["periodical_id"], name: "index_periodical_and_manifestations_on_periodical_id" + t.index ["periodical_master"], name: "index_periodical_and_manifestations_on_periodical_master", unique: true, where: "(periodical_master IS TRUE)" + end + + create_table "periodicals", force: :cascade do |t| + t.text "original_title", null: false + t.bigint "frequency_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["frequency_id"], name: "index_periodicals_on_frequency_id" + end + + create_table "picture_files", force: :cascade do |t| t.integer "picture_attachable_id" t.string "picture_attachable_type" t.string "content_type" t.text "title" t.string "thumbnail" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" - t.string "picture_file_name" - t.string "picture_content_type" - t.integer "picture_file_size" - t.datetime "picture_updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "picture_meta" t.string "picture_fingerprint" t.integer "picture_width" @@ -715,39 +755,39 @@ t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type" end - create_table "produce_types", id: :serial, force: :cascade do |t| + create_table "produce_types", force: :cascade do |t| t.string "name" t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "produces", id: :serial, force: :cascade do |t| - t.integer "agent_id", null: false - t.integer "manifestation_id", null: false + create_table "produces", force: :cascade do |t| + t.bigint "agent_id", null: false + t.bigint "manifestation_id", null: false t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "produce_type_id" t.index ["agent_id"], name: "index_produces_on_agent_id" t.index ["manifestation_id"], name: "index_produces_on_manifestation_id" end - create_table "profiles", id: :serial, force: :cascade do |t| - t.integer "user_id" - t.integer "user_group_id" - t.integer "library_id" + create_table "profiles", force: :cascade do |t| + t.bigint "user_id" + t.bigint "user_group_id" + t.bigint "library_id" t.string "locale" t.string "user_number" t.text "full_name" t.text "note" t.text "keyword_list" - t.integer "required_role_id" - t.datetime "created_at" - t.datetime "updated_at" + t.bigint "required_role_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "expired_at" t.text "full_name_transcription" t.datetime "date_of_birth" @@ -758,120 +798,109 @@ t.index ["user_number"], name: "index_profiles_on_user_number", unique: true end - create_table "realize_types", id: :serial, force: :cascade do |t| + create_table "realize_types", force: :cascade do |t| t.string "name" t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "realizes", id: :serial, force: :cascade do |t| - t.integer "agent_id", null: false - t.integer "expression_id", null: false + create_table "realizes", force: :cascade do |t| + t.bigint "agent_id", null: false + t.bigint "expression_id", null: false t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "realize_type_id" t.index ["agent_id"], name: "index_realizes_on_agent_id" t.index ["expression_id"], name: "index_realizes_on_expression_id" end - create_table "request_status_types", id: :serial, force: :cascade do |t| + create_table "request_status_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "request_types", id: :serial, force: :cascade do |t| + create_table "request_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "resource_export_file_transitions", id: :serial, force: :cascade do |t| + create_table "resource_export_file_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" t.integer "resource_export_file_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent", null: false t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id" t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true end - create_table "resource_export_files", id: :serial, force: :cascade do |t| - t.integer "user_id" - t.string "resource_export_file_name" - t.string "resource_export_content_type" - t.bigint "resource_export_file_size" - t.datetime "resource_export_updated_at" + create_table "resource_export_files", force: :cascade do |t| + t.bigint "user_id" t.datetime "executed_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["user_id"], name: "index_resource_export_files_on_user_id" end - create_table "resource_import_file_transitions", id: :serial, force: :cascade do |t| + create_table "resource_import_file_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" t.integer "resource_import_file_id" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent", null: false t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id" t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true end - create_table "resource_import_files", id: :serial, force: :cascade do |t| - t.integer "parent_id" - t.string "content_type" - t.integer "size" - t.integer "user_id" + create_table "resource_import_files", force: :cascade do |t| + t.bigint "user_id" t.text "note" t.datetime "executed_at" - t.string "resource_import_file_name" - t.string "resource_import_content_type" - t.integer "resource_import_file_size" - t.datetime "resource_import_updated_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "edit_mode" t.string "resource_import_fingerprint" t.text "error_message" t.string "user_encoding" t.integer "default_shelf_id" - t.index ["parent_id"], name: "index_resource_import_files_on_parent_id" t.index ["user_id"], name: "index_resource_import_files_on_user_id" end - create_table "resource_import_results", id: :serial, force: :cascade do |t| + create_table "resource_import_results", force: :cascade do |t| t.integer "resource_import_file_id" t.integer "manifestation_id" t.integer "item_id" t.text "body" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "error_message" t.index ["item_id"], name: "index_resource_import_results_on_item_id" t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id" t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id" end - create_table "roles", id: :serial, force: :cascade do |t| + create_table "roles", force: :cascade do |t| t.string "name", null: false t.string "display_name" t.text "note" @@ -882,9 +911,8 @@ t.jsonb "display_name_translations", default: {}, null: false end - create_table "search_engines", id: :serial, force: :cascade do |t| + create_table "search_engines", force: :cascade do |t| t.string "name", null: false - t.text "display_name" t.string "url", null: false t.text "base_url", null: false t.text "http_method", null: false @@ -892,34 +920,34 @@ t.text "additional_param" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.jsonb "display_name_translations", default: {}, null: false end - create_table "series_statement_merge_lists", id: :serial, force: :cascade do |t| + create_table "series_statement_merge_lists", force: :cascade do |t| t.string "title" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "series_statement_merges", id: :serial, force: :cascade do |t| + create_table "series_statement_merges", force: :cascade do |t| t.integer "series_statement_id", null: false t.integer "series_statement_merge_list_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id" t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id" end - create_table "series_statements", id: :serial, force: :cascade do |t| + create_table "series_statements", force: :cascade do |t| t.text "original_title" t.text "numbering" t.text "title_subseries" t.text "numbering_subseries" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "title_transcription" t.text "title_alternative" t.string "series_statement_identifier" @@ -936,48 +964,46 @@ t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier" end - create_table "shelves", id: :serial, force: :cascade do |t| + create_table "shelves", force: :cascade do |t| t.string "name", null: false - t.text "display_name" t.text "note" - t.integer "library_id", null: false + t.bigint "library_id", null: false t.integer "items_count", default: 0, null: false t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "closed", default: false, null: false t.jsonb "display_name_translations", default: {}, null: false t.index ["library_id"], name: "index_shelves_on_library_id" end - create_table "subject_heading_types", id: :serial, force: :cascade do |t| + create_table "subject_heading_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "subject_types", id: :serial, force: :cascade do |t| + create_table "subject_types", force: :cascade do |t| t.string "name", null: false t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end - create_table "subjects", id: :serial, force: :cascade do |t| - t.integer "parent_id" + create_table "subjects", force: :cascade do |t| + t.bigint "parent_id" t.integer "use_term_id" t.string "term" t.text "term_transcription" - t.integer "subject_type_id", null: false + t.bigint "subject_type_id", null: false t.text "scope_note" t.text "note" - t.integer "required_role_id", default: 1, null: false + t.bigint "required_role_id", default: 1, null: false t.integer "lock_version", default: 0, null: false t.datetime "created_at" t.datetime "updated_at" @@ -993,37 +1019,36 @@ t.index ["use_term_id"], name: "index_subjects_on_use_term_id" end - create_table "subscribes", id: :serial, force: :cascade do |t| - t.integer "subscription_id", null: false + create_table "subscribes", force: :cascade do |t| + t.bigint "subscription_id", null: false t.integer "work_id", null: false t.datetime "start_at", null: false t.datetime "end_at", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["subscription_id"], name: "index_subscribes_on_subscription_id" t.index ["work_id"], name: "index_subscribes_on_work_id" end - create_table "subscriptions", id: :serial, force: :cascade do |t| + create_table "subscriptions", force: :cascade do |t| t.text "title", null: false t.text "note" - t.integer "user_id" - t.integer "order_list_id" - t.datetime "deleted_at" + t.bigint "user_id" + t.bigint "order_list_id" t.integer "subscribes_count", default: 0, null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id" t.index ["user_id"], name: "index_subscriptions_on_user_id" end - create_table "user_export_file_transitions", id: :serial, force: :cascade do |t| + create_table "user_export_file_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" - t.integer "user_export_file_id" - t.datetime "created_at" - t.datetime "updated_at" + t.bigint "user_export_file_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent", null: false t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent" @@ -1031,84 +1056,76 @@ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id" end - create_table "user_export_files", id: :serial, force: :cascade do |t| - t.integer "user_id" - t.string "user_export_file_name" - t.string "user_export_content_type" - t.bigint "user_export_file_size" - t.datetime "user_export_updated_at" + create_table "user_export_files", force: :cascade do |t| + t.bigint "user_id" t.datetime "executed_at" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["user_id"], name: "index_user_export_files_on_user_id" end - create_table "user_groups", id: :serial, force: :cascade do |t| + create_table "user_groups", force: :cascade do |t| t.string "name" - t.text "display_name" t.text "note" t.integer "position" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "deleted_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "valid_period_for_new_user", default: 0, null: false t.datetime "expired_at" t.jsonb "display_name_translations", default: {}, null: false end - create_table "user_has_roles", id: :serial, force: :cascade do |t| - t.integer "user_id", null: false - t.integer "role_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + create_table "user_has_roles", force: :cascade do |t| + t.bigint "user_id", null: false + t.bigint "role_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.index ["role_id"], name: "index_user_has_roles_on_role_id" t.index ["user_id"], name: "index_user_has_roles_on_user_id" end - create_table "user_import_file_transitions", id: :serial, force: :cascade do |t| + create_table "user_import_file_transitions", force: :cascade do |t| t.string "to_state" t.text "metadata", default: "{}" t.integer "sort_key" - t.integer "user_import_file_id" - t.datetime "created_at" - t.datetime "updated_at" + t.bigint "user_import_file_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.boolean "most_recent", null: false t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent" t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id" end - create_table "user_import_files", id: :serial, force: :cascade do |t| - t.integer "user_id" + create_table "user_import_files", force: :cascade do |t| + t.bigint "user_id" t.text "note" t.datetime "executed_at" - t.string "user_import_file_name" - t.string "user_import_content_type" - t.integer "user_import_file_size" - t.datetime "user_import_updated_at" t.string "user_import_fingerprint" t.string "edit_mode" t.text "error_message" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "user_encoding" - t.integer "default_library_id" - t.integer "default_user_group_id" + t.bigint "default_library_id" + t.bigint "default_user_group_id" + t.index ["default_library_id"], name: "index_user_import_files_on_default_library_id" + t.index ["default_user_group_id"], name: "index_user_import_files_on_default_user_group_id" t.index ["user_id"], name: "index_user_import_files_on_user_id" end - create_table "user_import_results", id: :serial, force: :cascade do |t| - t.integer "user_import_file_id" - t.integer "user_id" + create_table "user_import_results", force: :cascade do |t| + t.bigint "user_import_file_id" + t.bigint "user_id" t.text "body" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.text "error_message" t.index ["user_id"], name: "index_user_import_results_on_user_id" t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id" end - create_table "users", id: :serial, force: :cascade do |t| + create_table "users", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" @@ -1119,8 +1136,8 @@ t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "username" t.datetime "deleted_at" t.datetime "expired_at" @@ -1136,7 +1153,7 @@ t.index ["username"], name: "index_users_on_username", unique: true end - create_table "versions", id: :serial, force: :cascade do |t| + create_table "versions", force: :cascade do |t| t.string "item_type", null: false t.integer "item_id", null: false t.string "event", null: false @@ -1146,10 +1163,10 @@ t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" end - create_table "withdraws", id: :serial, force: :cascade do |t| - t.integer "basket_id" - t.integer "item_id" - t.integer "librarian_id" + create_table "withdraws", force: :cascade do |t| + t.bigint "basket_id" + t.bigint "item_id" + t.bigint "librarian_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["basket_id"], name: "index_withdraws_on_basket_id" @@ -1157,11 +1174,30 @@ t.index ["librarian_id"], name: "index_withdraws_on_librarian_id" end + add_foreign_key "agent_import_files", "users" + add_foreign_key "doi_records", "manifestations" + add_foreign_key "donates", "agents" + add_foreign_key "donates", "items" + add_foreign_key "identifiers", "identifier_types" + add_foreign_key "identifiers", "manifestations" + add_foreign_key "import_requests", "manifestations" + add_foreign_key "import_requests", "users" + add_foreign_key "isbn_record_and_manifestations", "isbn_records" + add_foreign_key "isbn_record_and_manifestations", "manifestations" + add_foreign_key "issn_record_and_manifestations", "issn_records" + add_foreign_key "issn_record_and_manifestations", "manifestations" add_foreign_key "items", "manifestations" add_foreign_key "libraries", "library_groups" add_foreign_key "library_groups", "users" + add_foreign_key "periodical_and_manifestations", "manifestations" + add_foreign_key "periodical_and_manifestations", "periodicals" + add_foreign_key "periodicals", "frequencies" add_foreign_key "profiles", "users" + add_foreign_key "resource_import_files", "users" + add_foreign_key "subscriptions", "users" + add_foreign_key "user_export_files", "users" add_foreign_key "user_has_roles", "roles" add_foreign_key "user_has_roles", "users" + add_foreign_key "user_import_files", "users" add_foreign_key "users", "profiles" end diff --git a/spec/fixtures/classification_types.yml b/spec/fixtures/classification_types.yml index 11874ae7..b45ab9bb 100644 --- a/spec/fixtures/classification_types.yml +++ b/spec/fixtures/classification_types.yml @@ -52,11 +52,11 @@ classification_type_00006: # # Table name: classification_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/fixtures/classifications.yml b/spec/fixtures/classifications.yml index d820df73..f7bcb354 100644 --- a/spec/fixtures/classifications.yml +++ b/spec/fixtures/classifications.yml @@ -104,13 +104,13 @@ classification_00005: # # Table name: classifications # -# id :integer not null, primary key +# id :bigint not null, primary key # parent_id :integer # category :string not null # note :text # classification_type_id :integer not null -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # lft :integer # rgt :integer # manifestation_id :integer diff --git a/spec/fixtures/subject_heading_types.yml b/spec/fixtures/subject_heading_types.yml index 7d5e1c7e..98a5d4ea 100644 --- a/spec/fixtures/subject_heading_types.yml +++ b/spec/fixtures/subject_heading_types.yml @@ -28,11 +28,11 @@ subject_heading_type_00003: # # Table name: subject_heading_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/fixtures/subject_types.yml b/spec/fixtures/subject_types.yml index 2bf62806..435ef54f 100644 --- a/spec/fixtures/subject_types.yml +++ b/spec/fixtures/subject_types.yml @@ -31,11 +31,11 @@ subject_type_00004: # # Table name: subject_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/fixtures/subjects.yml b/spec/fixtures/subjects.yml index 5db201f6..2adb5e21 100644 --- a/spec/fixtures/subjects.yml +++ b/spec/fixtures/subjects.yml @@ -60,15 +60,15 @@ subject_00005: # # Table name: subjects # -# id :integer not null, primary key -# parent_id :integer +# id :bigint not null, primary key +# parent_id :bigint # use_term_id :integer # term :string # term_transcription :text -# subject_type_id :integer not null +# subject_type_id :bigint not null # scope_note :text # note :text -# required_role_id :integer default(1), not null +# required_role_id :bigint default(1), not null # lock_version :integer default(0), not null # created_at :datetime # updated_at :datetime diff --git a/spec/models/classification_spec.rb b/spec/models/classification_spec.rb index 506078e0..bf69d71e 100644 --- a/spec/models/classification_spec.rb +++ b/spec/models/classification_spec.rb @@ -9,13 +9,13 @@ # # Table name: classifications # -# id :integer not null, primary key +# id :bigint not null, primary key # parent_id :integer # category :string not null # note :text # classification_type_id :integer not null -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # lft :integer # rgt :integer # manifestation_id :integer diff --git a/spec/models/classification_type_spec.rb b/spec/models/classification_type_spec.rb index 060b48b2..260a9bcf 100644 --- a/spec/models/classification_type_spec.rb +++ b/spec/models/classification_type_spec.rb @@ -9,11 +9,11 @@ # # Table name: classification_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/models/subject_heading_type_spec.rb b/spec/models/subject_heading_type_spec.rb index bbbd5765..8ceddf39 100644 --- a/spec/models/subject_heading_type_spec.rb +++ b/spec/models/subject_heading_type_spec.rb @@ -9,11 +9,11 @@ # # Table name: subject_heading_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/models/subject_spec.rb b/spec/models/subject_spec.rb index 0e4eb8c3..8fbace04 100644 --- a/spec/models/subject_spec.rb +++ b/spec/models/subject_spec.rb @@ -12,15 +12,15 @@ # # Table name: subjects # -# id :integer not null, primary key -# parent_id :integer +# id :bigint not null, primary key +# parent_id :bigint # use_term_id :integer # term :string # term_transcription :text -# subject_type_id :integer not null +# subject_type_id :bigint not null # scope_note :text # note :text -# required_role_id :integer default(1), not null +# required_role_id :bigint default(1), not null # lock_version :integer default(0), not null # created_at :datetime # updated_at :datetime diff --git a/spec/models/subject_type_spec.rb b/spec/models/subject_type_spec.rb index 625d8190..e4a29de5 100644 --- a/spec/models/subject_type_spec.rb +++ b/spec/models/subject_type_spec.rb @@ -9,11 +9,11 @@ # # Table name: subject_types # -# id :integer not null, primary key +# id :bigint not null, primary key # name :string not null # display_name :text # note :text # position :integer -# created_at :datetime -# updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null #