From f6a52de4d5775836052d0a58a02e6e3b8ae6f4d9 Mon Sep 17 00:00:00 2001 From: Kosuke Tanabe Date: Sat, 17 Aug 2024 15:11:50 +0900 Subject: [PATCH] update annotations --- app/models/carrier_type.rb | 18 +++++++++++------- app/models/event_export_file.rb | 14 +++++++++----- app/models/inventory_file.rb | 18 +++++++++++------- app/models/library_group.rb | 4 ++++ app/models/manifestation.rb | 4 ++++ app/models/picture_file.rb | 4 ++++ app/models/resource_export_file.rb | 14 +++++++++----- app/models/user_export_file.rb | 14 +++++++++----- db/schema.rb | 4 ++-- spec/factories/carrier_types.rb | 18 +++++++++++------- spec/factories/manifestations.rb | 4 ++++ spec/fixtures/carrier_types.yml | 18 +++++++++++------- spec/fixtures/event_export_files.yml | 14 +++++++++----- spec/fixtures/inventory_files.yml | 18 +++++++++++------- spec/fixtures/library_groups.yml | 4 ++++ spec/fixtures/manifestations.yml | 4 ++++ spec/fixtures/picture_files.yml | 4 ++++ spec/fixtures/resource_export_files.yml | 14 +++++++++----- spec/fixtures/user_export_files.yml | 14 +++++++++----- spec/models/carrier_type_spec.rb | 18 +++++++++++------- spec/models/event_export_file_spec.rb | 14 +++++++++----- spec/models/inventory_file_spec.rb | 18 +++++++++++------- spec/models/library_group_spec.rb | 4 ++++ spec/models/manifestation_spec.rb | 4 ++++ spec/models/picture_file_spec.rb | 4 ++++ spec/models/resource_export_file_spec.rb | 14 +++++++++----- spec/models/user_export_file_spec.rb | 14 +++++++++----- 27 files changed, 200 insertions(+), 96 deletions(-) diff --git a/app/models/carrier_type.rb b/app/models/carrier_type.rb index 637e2229b5..90f7162c7f 100644 --- a/app/models/carrier_type.rb +++ b/app/models/carrier_type.rb @@ -25,11 +25,15 @@ def mods_type # # Table name: carrier_types # -# id :bigint not null, primary key -# name :string not null -# display_name :text -# note :text -# position :integer -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# name :string not null +# display_name :text +# note :text +# position :integer +# created_at :datetime not null +# updated_at :datetime not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :bigint +# attachment_updated_at :datetime # diff --git a/app/models/event_export_file.rb b/app/models/event_export_file.rb index eabb0970b8..bf766ae6c8 100644 --- a/app/models/event_export_file.rb +++ b/app/models/event_export_file.rb @@ -40,9 +40,13 @@ def export! # # Table name: event_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# event_export_file_name :string +# event_export_content_type :string +# event_export_file_size :bigint +# event_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/app/models/inventory_file.rb b/app/models/inventory_file.rb index 2b347c0888..8d7cb123cd 100644 --- a/app/models/inventory_file.rb +++ b/app/models/inventory_file.rb @@ -55,11 +55,15 @@ def found_items # # Table name: inventory_files # -# id :bigint not null, primary key -# user_id :bigint -# note :text -# created_at :datetime not null -# updated_at :datetime not null -# inventory_fingerprint :string -# shelf_id :bigint +# id :bigint not null, primary key +# user_id :bigint +# note :text +# created_at :datetime not null +# updated_at :datetime not null +# inventory_file_name :string +# inventory_content_type :string +# inventory_file_size :integer +# inventory_updated_at :datetime +# inventory_fingerprint :string +# shelf_id :bigint # diff --git a/app/models/library_group.rb b/app/models/library_group.rb index 3f5d450ea2..920b3c34a1 100644 --- a/app/models/library_group.rb +++ b/app/models/library_group.rb @@ -87,6 +87,10 @@ def network_access_allowed?(ip_address, options = {}) # pub_year_facet_range_interval :integer default(10) # user_id :bigint # csv_charset_conversion :boolean default(FALSE), not null +# header_logo_file_name :string +# header_logo_content_type :string +# header_logo_file_size :bigint +# header_logo_updated_at :datetime # email :string # login_banner :text # footer_banner :text diff --git a/app/models/manifestation.rb b/app/models/manifestation.rb index 1ac8c6688f..a6c05956c0 100644 --- a/app/models/manifestation.rb +++ b/app/models/manifestation.rb @@ -749,6 +749,10 @@ def set_custom_property(row) # required_score :integer default(0), not null # frequency_id :bigint default(1), not null # subscription_master :boolean default(FALSE), not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :integer +# attachment_updated_at :datetime # nii_type_id :bigint # title_alternative_transcription :text # description :text diff --git a/app/models/picture_file.rb b/app/models/picture_file.rb index 8452ff0015..0bf006413a 100644 --- a/app/models/picture_file.rb +++ b/app/models/picture_file.rb @@ -25,6 +25,10 @@ class PictureFile < ApplicationRecord # position :integer # created_at :datetime not null # updated_at :datetime not null +# picture_file_name :string +# picture_content_type :string +# picture_file_size :integer +# picture_updated_at :datetime # picture_fingerprint :string # picture_width :integer # picture_height :integer diff --git a/app/models/resource_export_file.rb b/app/models/resource_export_file.rb index e0bf67e18b..cad0a4b4a4 100644 --- a/app/models/resource_export_file.rb +++ b/app/models/resource_export_file.rb @@ -39,9 +39,13 @@ def export! # # Table name: resource_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# resource_export_file_name :string +# resource_export_content_type :string +# resource_export_file_size :bigint +# resource_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/app/models/user_export_file.rb b/app/models/user_export_file.rb index 0c66150a7a..4c1c93435d 100644 --- a/app/models/user_export_file.rb +++ b/app/models/user_export_file.rb @@ -41,9 +41,13 @@ def export! # # Table name: user_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# user_export_file_name :string +# user_export_content_type :string +# user_export_file_size :bigint +# user_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/db/schema.rb b/db/schema.rb index 99b7eab5d5..7800f2ea41 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2024_08_16_112305) do +ActiveRecord::Schema[7.1].define(version: 2024_08_16_112305) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -884,11 +884,11 @@ t.integer "pub_year_facet_range_interval", default: 10 t.bigint "user_id" t.boolean "csv_charset_conversion", default: false, null: false - t.string "email" t.string "header_logo_file_name" t.string "header_logo_content_type" t.bigint "header_logo_file_size" t.datetime "header_logo_updated_at", precision: nil + t.string "email" t.index "lower((name)::text)", name: "index_library_groups_on_lower_name", unique: true t.index ["email"], name: "index_library_groups_on_email" t.index ["short_name"], name: "index_library_groups_on_short_name" diff --git a/spec/factories/carrier_types.rb b/spec/factories/carrier_types.rb index 4434b252f7..09b77cfd99 100644 --- a/spec/factories/carrier_types.rb +++ b/spec/factories/carrier_types.rb @@ -8,11 +8,15 @@ # # Table name: carrier_types # -# id :bigint not null, primary key -# name :string not null -# display_name :text -# note :text -# position :integer -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# name :string not null +# display_name :text +# note :text +# position :integer +# created_at :datetime not null +# updated_at :datetime not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :bigint +# attachment_updated_at :datetime # diff --git a/spec/factories/manifestations.rb b/spec/factories/manifestations.rb index 5c8e5ed918..d73d79299e 100644 --- a/spec/factories/manifestations.rb +++ b/spec/factories/manifestations.rb @@ -48,6 +48,10 @@ # required_score :integer default(0), not null # frequency_id :bigint default(1), not null # subscription_master :boolean default(FALSE), not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :integer +# attachment_updated_at :datetime # nii_type_id :bigint # title_alternative_transcription :text # description :text diff --git a/spec/fixtures/carrier_types.yml b/spec/fixtures/carrier_types.yml index 4ae0204d6d..4df7045f3a 100644 --- a/spec/fixtures/carrier_types.yml +++ b/spec/fixtures/carrier_types.yml @@ -36,11 +36,15 @@ carrier_type_00004: # # Table name: carrier_types # -# id :bigint not null, primary key -# name :string not null -# display_name :text -# note :text -# position :integer -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# name :string not null +# display_name :text +# note :text +# position :integer +# created_at :datetime not null +# updated_at :datetime not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :bigint +# attachment_updated_at :datetime # diff --git a/spec/fixtures/event_export_files.yml b/spec/fixtures/event_export_files.yml index 8adbc0d234..e5960e5cc6 100644 --- a/spec/fixtures/event_export_files.yml +++ b/spec/fixtures/event_export_files.yml @@ -14,9 +14,13 @@ event_export_file_00003: # # Table name: event_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# event_export_file_name :string +# event_export_content_type :string +# event_export_file_size :bigint +# event_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/fixtures/inventory_files.yml b/spec/fixtures/inventory_files.yml index 751687d3c0..0d0fedac1b 100644 --- a/spec/fixtures/inventory_files.yml +++ b/spec/fixtures/inventory_files.yml @@ -14,12 +14,16 @@ inventory_file_00003: # # Table name: inventory_files # -# id :bigint not null, primary key -# user_id :bigint -# note :text -# created_at :datetime not null -# updated_at :datetime not null -# inventory_fingerprint :string -# shelf_id :bigint +# id :bigint not null, primary key +# user_id :bigint +# note :text +# created_at :datetime not null +# updated_at :datetime not null +# inventory_file_name :string +# inventory_content_type :string +# inventory_file_size :integer +# inventory_updated_at :datetime +# inventory_fingerprint :string +# shelf_id :bigint # diff --git a/spec/fixtures/library_groups.yml b/spec/fixtures/library_groups.yml index e828117ade..483bc1cda2 100644 --- a/spec/fixtures/library_groups.yml +++ b/spec/fixtures/library_groups.yml @@ -41,6 +41,10 @@ one: # pub_year_facet_range_interval :integer default(10) # user_id :bigint # csv_charset_conversion :boolean default(FALSE), not null +# header_logo_file_name :string +# header_logo_content_type :string +# header_logo_file_size :bigint +# header_logo_updated_at :datetime # email :string # login_banner :text # footer_banner :text diff --git a/spec/fixtures/manifestations.yml b/spec/fixtures/manifestations.yml index 0befff570b..e034139e6d 100644 --- a/spec/fixtures/manifestations.yml +++ b/spec/fixtures/manifestations.yml @@ -1870,6 +1870,10 @@ manifestation_00218: # required_score :integer default(0), not null # frequency_id :bigint default(1), not null # subscription_master :boolean default(FALSE), not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :integer +# attachment_updated_at :datetime # nii_type_id :bigint # title_alternative_transcription :text # description :text diff --git a/spec/fixtures/picture_files.yml b/spec/fixtures/picture_files.yml index 151f4756f9..d69f0079af 100644 --- a/spec/fixtures/picture_files.yml +++ b/spec/fixtures/picture_files.yml @@ -39,6 +39,10 @@ picture_file_00004: # position :integer # created_at :datetime not null # updated_at :datetime not null +# picture_file_name :string +# picture_content_type :string +# picture_file_size :integer +# picture_updated_at :datetime # picture_fingerprint :string # picture_width :integer # picture_height :integer diff --git a/spec/fixtures/resource_export_files.yml b/spec/fixtures/resource_export_files.yml index df12fa7b4b..1c909936bf 100644 --- a/spec/fixtures/resource_export_files.yml +++ b/spec/fixtures/resource_export_files.yml @@ -14,9 +14,13 @@ resource_export_file_00003: # # Table name: resource_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# resource_export_file_name :string +# resource_export_content_type :string +# resource_export_file_size :bigint +# resource_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/fixtures/user_export_files.yml b/spec/fixtures/user_export_files.yml index 45bf61f4a1..8016fee2c1 100644 --- a/spec/fixtures/user_export_files.yml +++ b/spec/fixtures/user_export_files.yml @@ -14,9 +14,13 @@ user_export_file_00003: # # Table name: user_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# user_export_file_name :string +# user_export_content_type :string +# user_export_file_size :bigint +# user_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/models/carrier_type_spec.rb b/spec/models/carrier_type_spec.rb index 651b3cfbfa..79561ff9ce 100644 --- a/spec/models/carrier_type_spec.rb +++ b/spec/models/carrier_type_spec.rb @@ -13,11 +13,15 @@ # # Table name: carrier_types # -# id :bigint not null, primary key -# name :string not null -# display_name :text -# note :text -# position :integer -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# name :string not null +# display_name :text +# note :text +# position :integer +# created_at :datetime not null +# updated_at :datetime not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :bigint +# attachment_updated_at :datetime # diff --git a/spec/models/event_export_file_spec.rb b/spec/models/event_export_file_spec.rb index 9600a52527..9db9a95902 100644 --- a/spec/models/event_export_file_spec.rb +++ b/spec/models/event_export_file_spec.rb @@ -18,9 +18,13 @@ # # Table name: event_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# event_export_file_name :string +# event_export_content_type :string +# event_export_file_size :bigint +# event_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/models/inventory_file_spec.rb b/spec/models/inventory_file_spec.rb index b790a1baad..5030be3df5 100644 --- a/spec/models/inventory_file_spec.rb +++ b/spec/models/inventory_file_spec.rb @@ -21,11 +21,15 @@ # # Table name: inventory_files # -# id :bigint not null, primary key -# user_id :bigint -# note :text -# created_at :datetime not null -# updated_at :datetime not null -# inventory_fingerprint :string -# shelf_id :bigint +# id :bigint not null, primary key +# user_id :bigint +# note :text +# created_at :datetime not null +# updated_at :datetime not null +# inventory_file_name :string +# inventory_content_type :string +# inventory_file_size :integer +# inventory_updated_at :datetime +# inventory_fingerprint :string +# shelf_id :bigint # diff --git a/spec/models/library_group_spec.rb b/spec/models/library_group_spec.rb index c7ce345e28..c0abe6dc47 100644 --- a/spec/models/library_group_spec.rb +++ b/spec/models/library_group_spec.rb @@ -50,6 +50,10 @@ # pub_year_facet_range_interval :integer default(10) # user_id :bigint # csv_charset_conversion :boolean default(FALSE), not null +# header_logo_file_name :string +# header_logo_content_type :string +# header_logo_file_size :bigint +# header_logo_updated_at :datetime # email :string # login_banner :text # footer_banner :text diff --git a/spec/models/manifestation_spec.rb b/spec/models/manifestation_spec.rb index 074e696385..c0fb532991 100644 --- a/spec/models/manifestation_spec.rb +++ b/spec/models/manifestation_spec.rb @@ -315,6 +315,10 @@ # required_score :integer default(0), not null # frequency_id :bigint default(1), not null # subscription_master :boolean default(FALSE), not null +# attachment_file_name :string +# attachment_content_type :string +# attachment_file_size :integer +# attachment_updated_at :datetime # nii_type_id :bigint # title_alternative_transcription :text # description :text diff --git a/spec/models/picture_file_spec.rb b/spec/models/picture_file_spec.rb index d694696cac..5f0e6e1b7b 100644 --- a/spec/models/picture_file_spec.rb +++ b/spec/models/picture_file_spec.rb @@ -22,6 +22,10 @@ # position :integer # created_at :datetime not null # updated_at :datetime not null +# picture_file_name :string +# picture_content_type :string +# picture_file_size :integer +# picture_updated_at :datetime # picture_fingerprint :string # picture_width :integer # picture_height :integer diff --git a/spec/models/resource_export_file_spec.rb b/spec/models/resource_export_file_spec.rb index 109e413c5c..8d497612ab 100644 --- a/spec/models/resource_export_file_spec.rb +++ b/spec/models/resource_export_file_spec.rb @@ -27,9 +27,13 @@ # # Table name: resource_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# resource_export_file_name :string +# resource_export_content_type :string +# resource_export_file_size :bigint +# resource_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null # diff --git a/spec/models/user_export_file_spec.rb b/spec/models/user_export_file_spec.rb index faf757dff8..d0c3b2b252 100644 --- a/spec/models/user_export_file_spec.rb +++ b/spec/models/user_export_file_spec.rb @@ -17,9 +17,13 @@ # # Table name: user_export_files # -# id :bigint not null, primary key -# user_id :bigint -# executed_at :datetime -# created_at :datetime not null -# updated_at :datetime not null +# id :bigint not null, primary key +# user_id :bigint +# user_export_file_name :string +# user_export_content_type :string +# user_export_file_size :bigint +# user_export_updated_at :datetime +# executed_at :datetime +# created_at :datetime not null +# updated_at :datetime not null #