From bcb21c6de2cba5fc7c0ea93eb1d77ebc8739838c Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Mon, 19 Jan 2026 10:21:41 +0100 Subject: [PATCH 1/8] first step --- Gemfile.lock | 146 +++++++++--------- app/models/university/organization.rb | 4 + .../organization/localization/laboratory.rb | 72 +++++++++ .../organization/localization/location.rb | 72 +++++++++ .../organization/localization/school.rb | 72 +++++++++ .../university/organization/with_facets.rb | 34 ++++ app/services/migrations/organizations.rb | 23 +++ ...add_booleans_to_university_organization.rb | 7 + db/schema.rb | 5 +- 9 files changed, 363 insertions(+), 72 deletions(-) create mode 100644 app/models/university/organization/localization/laboratory.rb create mode 100644 app/models/university/organization/localization/location.rb create mode 100644 app/models/university/organization/localization/school.rb create mode 100644 app/models/university/organization/with_facets.rb create mode 100644 app/services/migrations/organizations.rb create mode 100644 db/migrate/20260119090426_add_booleans_to_university_organization.rb diff --git a/Gemfile.lock b/Gemfile.lock index 072bb521d3..da024fcdd9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,14 +119,14 @@ GEM add_to_calendar (0.5.1) tzinfo (>= 1.1, < 3) tzinfo-data (~> 1.2020) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) annotaterb (4.20.0) activerecord (>= 6.0.0) activesupport (>= 6.0.0) aws-eventstream (1.4.0) - aws-partitions (1.1187.0) - aws-sdk-core (3.239.1) + aws-partitions (1.1206.0) + aws-sdk-core (3.241.4) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) @@ -134,29 +134,29 @@ GEM bigdecimal jmespath (~> 1, >= 1.6.1) logger - aws-sdk-kms (1.118.0) - aws-sdk-core (~> 3, >= 3.239.1) + aws-sdk-kms (1.121.0) + aws-sdk-core (~> 3, >= 3.241.4) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.205.0) - aws-sdk-core (~> 3, >= 3.234.0) + aws-sdk-s3 (1.212.0) + aws-sdk-core (~> 3, >= 3.241.4) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) - base64 (0.2.0) - bcrypt (3.1.20) + base64 (0.3.0) + bcrypt (3.1.21) benchmark (0.5.0) better_errors (2.10.1) erubi (>= 1.0.0) rack (>= 0.9.0) rouge (>= 1.0.0) - bigdecimal (3.3.1) + bigdecimal (4.0.1) bindex (0.8.1) binding_of_caller (1.0.1) debug_inspector (>= 1.2.0) - bootsnap (1.19.0) + bootsnap (1.21.1) msgpack (~> 1.2) - bootstrap (5.3.5) + bootstrap (5.3.8) popper_js (>= 2.11.8, < 3) bootstrap5-kaminari-views (0.0.1) kaminari (>= 0.13) @@ -170,7 +170,8 @@ GEM bugsnag (6.28.0) concurrent-ruby (~> 1.0) builder (3.3.0) - byebug (12.0.0) + byebug (13.0.0) + reline (>= 0.6.0) cancancan (3.3.0) capybara (3.40.0) addressable @@ -181,7 +182,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - caxlsx (4.4.0) + caxlsx (4.4.1) htmlentities (~> 4.3, >= 4.3.4) marcel (~> 1.0) nokogiri (~> 1.10, >= 1.10.4) @@ -196,14 +197,14 @@ GEM namae (~> 1.0) observer (< 1.0) open-uri (< 1.0) - citeproc-ruby (2.1.4) + citeproc-ruby (2.1.8) citeproc (~> 1.0, >= 1.0.9) csl (~> 2.0) observer (< 1.0) cocoon (1.2.15) - concurrent-ruby (1.3.5) - connection_pool (2.5.4) - countries (8.0.4) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) + countries (8.1.0) unaccent (~> 0.3) country_select (11.0.0) countries (> 6.0, < 9.0) @@ -227,7 +228,7 @@ GEM metainspector nokogiri rails-html-sanitizer - date (3.5.0) + date (3.5.1) debug_inspector (1.2.0) devise (4.9.4) bcrypt (~> 3.0) @@ -245,7 +246,7 @@ GEM encryptor (3.0.0) enum_help (0.0.20) activesupport (>= 3.0.0) - erb (6.0.0) + erb (6.0.1) erubi (1.13.1) et-orbi (1.4.0) tzinfo @@ -264,7 +265,7 @@ GEM http-cookie (>= 1.0.0) faraday-encoding (0.0.6) faraday - faraday-follow_redirects (0.4.0) + faraday-follow_redirects (0.5.0) faraday (>= 1, < 3) faraday-gzip (2.0.1) faraday (>= 1.0) @@ -275,17 +276,17 @@ GEM multipart-post (~> 2) faraday-net_http (3.4.2) net-http (~> 0.5) - faraday-retry (2.3.2) + faraday-retry (2.4.0) faraday (~> 2.0) fastimage (2.4.0) - ffi (1.17.2-arm64-darwin) - ffi (1.17.2-x86_64-darwin) - ffi (1.17.2-x86_64-linux-gnu) + ffi (1.17.3-arm64-darwin) + ffi (1.17.3-x86_64-darwin) + ffi (1.17.3-x86_64-linux-gnu) figaro (1.3.0) thor (>= 0.14.0, < 2) font-awesome-sass (6.7.2) sassc (~> 2.0) - forwardable (1.3.3) + forwardable (1.4.0) fugit (1.12.1) et-orbi (~> 1.4) raabro (~> 1.4) @@ -306,26 +307,26 @@ GEM geocoder (1.8.6) base64 (>= 0.1.0) csv (>= 3.0.0) - gitlab (6.0.0) - base64 (~> 0.2.0) + gitlab (6.1.0) + base64 httparty (~> 0.20) terminal-table (>= 1.5.1) globalid (1.3.0) activesupport (>= 6.1) - good_job (4.12.1) + good_job (4.13.1) activejob (>= 6.1.0) activerecord (>= 6.1.0) concurrent-ruby (>= 1.3.1) fugit (>= 1.11.0) railties (>= 6.1.0) thor (>= 1.0.0) - google-protobuf (4.33.1-arm64-darwin) + google-protobuf (4.33.4-arm64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.33.1-x86_64-darwin) + google-protobuf (4.33.4-x86_64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.33.1-x86_64-linux-gnu) + google-protobuf (4.33.4-x86_64-linux-gnu) bigdecimal rake (>= 13) hal_openscience (0.1.0) @@ -333,17 +334,18 @@ GEM net-http open-uri hashdiff (1.2.1) - hashie (5.0.0) + hashie (5.1.0) + logger htmlentities (4.4.2) http-cookie (1.1.0) domain_name (~> 0.5) - httparty (0.23.2) + httparty (0.24.2) csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) httpclient (2.9.0) mutex_m - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) i18n_data (0.17.1) simple_po_parser (~> 1.1) @@ -355,8 +357,8 @@ GEM ruby-vips (>= 2.0.17, < 3) invisible_captcha (2.3.0) rails (>= 5.2) - io-console (0.8.1) - irb (1.15.3) + io-console (0.8.2) + irb (1.16.0) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) @@ -370,10 +372,10 @@ GEM thor (>= 0.14, < 2.0) jsbundling-rails (1.3.1) railties (>= 6.0.0) - json (2.16.0) - json-schema (6.0.0) + json (2.18.0) + json-schema (6.1.0) addressable (~> 2.8) - bigdecimal (~> 3.1) + bigdecimal (>= 3.1, < 5) jwt (3.1.2) base64 kamifusen (1.13.2) @@ -398,14 +400,15 @@ GEM json net-http open-uri - listen (3.9.0) + listen (3.10.0) + logger rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) logger (1.7.0) - loofah (2.24.1) + loofah (2.25.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lucide-rails (0.7.1) + lucide-rails (0.7.3) railties (>= 4.1.0) mail (2.9.0) logger @@ -430,18 +433,19 @@ GEM mini_magick (5.3.1) logger mini_mime (1.1.5) - minitest (5.26.2) + minitest (6.0.1) + prism (~> 1.5) msgpack (1.8.0) - multi_xml (0.7.2) - bigdecimal (~> 3.1) + multi_xml (0.8.1) + bigdecimal (>= 3.1, < 5) multipart-post (2.4.1) mutex_m (0.3.0) namae (1.2.0) racc (~> 1.7) nesty (1.0.2) - net-http (0.8.0) + net-http (0.9.1) uri (>= 0.11.1) - net-imap (0.5.12) + net-imap (0.6.2) date net-protocol net-pop (0.1.2) @@ -499,9 +503,9 @@ GEM activerecord (>= 7, < 8.2) pexels (0.5.0) requests (~> 1.0.2) - pg (1.6.2-arm64-darwin) - pg (1.6.2-x86_64-darwin) - pg (1.6.2-x86_64-linux) + pg (1.6.3-arm64-darwin) + pg (1.6.3-x86_64-darwin) + pg (1.6.3-x86_64-linux) pg_query (6.1.0) google-protobuf (>= 3.25.3) pghero (3.7.0) @@ -510,10 +514,11 @@ GEM pp (0.6.3) prettyprint prettyprint (0.2.0) - psych (5.2.6) + prism (1.8.0) + psych (5.3.1) date stringio - public_suffix (6.0.2) + public_suffix (7.0.2) puma (7.1.0) nio4r (~> 2.0) raabro (1.4.0) @@ -531,7 +536,7 @@ GEM rack-test (2.2.0) rack (>= 1.3) rack-timeout (0.7.0) - rackup (2.2.1) + rackup (2.3.1) rack (>= 3) rails (8.0.4) actioncable (= 8.0.4) @@ -575,13 +580,13 @@ GEM ffi (~> 1.0) rbnacl (7.1.2) ffi (~> 1) - rdoc (6.15.1) + rdoc (7.1.0) erb psych (>= 4.0.0) tsort redis (5.4.1) redis-client (>= 0.22.0) - redis-client (0.26.1) + redis-client (0.26.3) connection_pool regexp_parser (2.11.3) reline (0.6.3) @@ -596,7 +601,7 @@ GEM nokogiri (~> 1) rubyzip (>= 1.3.0, < 3.0.0) rotp (6.3.0) - rouge (4.6.1) + rouge (4.7.0) rspec-core (3.13.6) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) @@ -632,7 +637,7 @@ GEM ruby-saml (1.18.1) nokogiri (>= 1.13.10) rexml - ruby-vips (2.2.5) + ruby-vips (2.3.0) ffi (~> 1.12) logger rubyzip (2.4.1) @@ -658,10 +663,10 @@ GEM set (1.1.2) simple-navigation (4.4.0) activesupport (>= 2.3.2) - simple_form (5.4.0) + simple_form (5.4.1) actionpack (>= 7.0) activemodel (>= 7.0) - simple_form_bs5_file_input (0.2.1) + simple_form_bs5_file_input (0.3.0) rails simple_form simple_form_password_with_hints (0.0.10) @@ -687,37 +692,36 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - stringio (3.1.8) + stringio (3.2.0) sugar-high (0.7.3) sweetloader (0.1.6) activesupport (>= 3.0.1) i18n terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) - thor (1.4.0) - tilt (2.6.1) - time (0.4.1) + thor (1.5.0) + tilt (2.7.0) + time (0.4.2) date - timeout (0.4.4) + timeout (0.6.0) tsort (0.2.0) typhoeus (1.5.0) ethon (>= 0.9.0, < 0.16.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2025.2) + tzinfo-data (1.2025.3) tzinfo (>= 1.0.0) unaccent (0.4.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) - unicode-emoji (4.1.0) + unicode-emoji (4.2.0) unsplash (3.1.1) faraday-multipart (~> 1.0.4) httparty (~> 0.20) oauth2 (>= 2.0.8) uri (1.1.1) useragent (0.16.11) - vcr (6.3.1) - base64 + vcr (6.4.0) version_gem (1.1.9) vimeo (1.5.4) httparty (>= 0.4.5) @@ -747,7 +751,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.3) + zeitwerk (2.7.4) zlib (3.2.2) PLATFORMS diff --git a/app/models/university/organization.rb b/app/models/university/organization.rb index 333b6371b2..0c944c8784 100644 --- a/app/models/university/organization.rb +++ b/app/models/university/organization.rb @@ -9,6 +9,9 @@ # country :string # deleted_at :datetime # email :string +# is_laboratory :boolean default(FALSE) +# is_location :boolean default(FALSE) +# is_school :boolean default(FALSE) # kind :integer default("company") # latitude :float # longitude :float @@ -46,6 +49,7 @@ class University::Organization < ApplicationRecord include Sanitizable include Searchable include WithCountry + include WithFacets include WithGeolocation include WithKind include WithOpenApi diff --git a/app/models/university/organization/localization/laboratory.rb b/app/models/university/organization/localization/laboratory.rb new file mode 100644 index 0000000000..0b327e0fdf --- /dev/null +++ b/app/models/university/organization/localization/laboratory.rb @@ -0,0 +1,72 @@ +# == Schema Information +# +# Table name: university_organization_localizations +# +# id :uuid not null, primary key +# address_additional :string +# address_name :string +# deleted_at :datetime +# featured_image_alt :string +# featured_image_credit :text +# linkedin :string +# long_name :string +# mastodon :string +# meta_description :text +# migration_identifier :string +# name :string +# published :boolean default(TRUE) +# published_at :datetime +# slug :string +# summary :text +# text :text +# twitter :string +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid uniquely indexed => [language_id], indexed +# language_id :uuid uniquely indexed => [about_id], indexed +# university_id :uuid indexed +# +# Indexes +# +# idx_on_about_id_language_id_eb921fd47b (about_id,language_id) UNIQUE +# index_university_organization_localizations_on_about_id (about_id) +# index_university_organization_localizations_on_language_id (language_id) +# index_university_organization_localizations_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_19fb4f0718 (about_id => university_organizations.id) +# fk_rails_4b46ee9073 (language_id => languages.id) +# fk_rails_ba221edb00 (university_id => universities.id) +# +class University::Organization::Localization::Laboratory < University::Organization::Localization + def self.polymorphic_name + 'University::Organization::Localization::Laboratory' + end + + def git_path_relative + "laboratories/#{slug}/_index.html" + end + + def template_static + "admin/university/organizations/laboratories/static" + end + + def dependencies + [ + organization_l10n, + organization + ] + end + + def references + # TODO + end + + def static_localization_key + # so we don't mess with the University::Organization::Localization static_localization_key + "#{about.class.polymorphic_name.parameterize}-laboratory-#{self.about_id}" + end + +end diff --git a/app/models/university/organization/localization/location.rb b/app/models/university/organization/localization/location.rb new file mode 100644 index 0000000000..af3c248fa2 --- /dev/null +++ b/app/models/university/organization/localization/location.rb @@ -0,0 +1,72 @@ +# == Schema Information +# +# Table name: university_organization_localizations +# +# id :uuid not null, primary key +# address_additional :string +# address_name :string +# deleted_at :datetime +# featured_image_alt :string +# featured_image_credit :text +# linkedin :string +# long_name :string +# mastodon :string +# meta_description :text +# migration_identifier :string +# name :string +# published :boolean default(TRUE) +# published_at :datetime +# slug :string +# summary :text +# text :text +# twitter :string +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid uniquely indexed => [language_id], indexed +# language_id :uuid uniquely indexed => [about_id], indexed +# university_id :uuid indexed +# +# Indexes +# +# idx_on_about_id_language_id_eb921fd47b (about_id,language_id) UNIQUE +# index_university_organization_localizations_on_about_id (about_id) +# index_university_organization_localizations_on_language_id (language_id) +# index_university_organization_localizations_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_19fb4f0718 (about_id => university_organizations.id) +# fk_rails_4b46ee9073 (language_id => languages.id) +# fk_rails_ba221edb00 (university_id => universities.id) +# +class University::Organization::Localization::Location < University::Organization::Localization + def self.polymorphic_name + 'University::Organization::Localization::Location' + end + + def git_path_relative + "locations/#{slug}/_index.html" + end + + def template_static + "admin/university/organizations/locations/static" + end + + def dependencies + [ + organization_l10n, + organization + ] + end + + def references + # TODO + end + + def static_localization_key + # so we don't mess with the University::Organization::Localization static_localization_key + "#{about.class.polymorphic_name.parameterize}-location-#{self.about_id}" + end + +end diff --git a/app/models/university/organization/localization/school.rb b/app/models/university/organization/localization/school.rb new file mode 100644 index 0000000000..6e96a9bbae --- /dev/null +++ b/app/models/university/organization/localization/school.rb @@ -0,0 +1,72 @@ +# == Schema Information +# +# Table name: university_organization_localizations +# +# id :uuid not null, primary key +# address_additional :string +# address_name :string +# deleted_at :datetime +# featured_image_alt :string +# featured_image_credit :text +# linkedin :string +# long_name :string +# mastodon :string +# meta_description :text +# migration_identifier :string +# name :string +# published :boolean default(TRUE) +# published_at :datetime +# slug :string +# summary :text +# text :text +# twitter :string +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid uniquely indexed => [language_id], indexed +# language_id :uuid uniquely indexed => [about_id], indexed +# university_id :uuid indexed +# +# Indexes +# +# idx_on_about_id_language_id_eb921fd47b (about_id,language_id) UNIQUE +# index_university_organization_localizations_on_about_id (about_id) +# index_university_organization_localizations_on_language_id (language_id) +# index_university_organization_localizations_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_19fb4f0718 (about_id => university_organizations.id) +# fk_rails_4b46ee9073 (language_id => languages.id) +# fk_rails_ba221edb00 (university_id => universities.id) +# +class University::Organization::Localization::School < University::Organization::Localization + def self.polymorphic_name + 'University::Organization::Localization::School' + end + + def git_path_relative + "schools/#{slug}/_index.html" + end + + def template_static + "admin/university/organizations/schools/static" + end + + def dependencies + [ + organization_l10n, + organization + ] + end + + def references + # TODO + end + + def static_localization_key + # so we don't mess with the University::Organization::Localization static_localization_key + "#{about.class.polymorphic_name.parameterize}-school-#{self.about_id}" + end + +end diff --git a/app/models/university/organization/with_facets.rb b/app/models/university/organization/with_facets.rb new file mode 100644 index 0000000000..ab1751360d --- /dev/null +++ b/app/models/university/organization/with_facets.rb @@ -0,0 +1,34 @@ +module University::Organization::WithFacets + extend ActiveSupport::Concern + + included do + LIST_OF_FACETS = [ + :location, + :school, + :laboratory + ].freeze + + scope :locations, -> { where(is_location: true) } + scope :schools, -> { where(is_school: true) } + scope :laboratories, -> { where(is_laboratory: true) } + scope :for_facet, -> (facet, language = nil) { where("is_#{facet}": true) } + end + + def facets + LIST_OF_FACETS.reject do |facet| + !public_send("is_#{facet}") + end + end + + def location_facets + @location_facets ||= University::Organization::Localization::Location.where(id: localization_ids) + end + + def school_facets + @school_facets ||= University::Organization::Localization::School.where(id: localization_ids) + end + + def laboratory_facets + @laboratory_facets ||= University::Organization::Localization::Laboratory.where(id: localization_ids) + end +end \ No newline at end of file diff --git a/app/services/migrations/organizations.rb b/app/services/migrations/organizations.rb new file mode 100644 index 0000000000..730fc0557d --- /dev/null +++ b/app/services/migrations/organizations.rb @@ -0,0 +1,23 @@ +class Migrations::Organizations + def self.migrate + University.find_each do |university| + locations = university.locations + schools = university.schools + laboratories = university.laboratories + next if schools.none? && laboratories.none? && locations.none? + puts university + puts '--- locations' + locations.each do |location| + puts location.original_localization + end + puts '--- schools' + schools.each do |school| + puts school.original_localization + end + puts '--- laboratories' + laboratories.each do |laboratory| + puts laboratory.original_localization + end + end + end +end \ No newline at end of file diff --git a/db/migrate/20260119090426_add_booleans_to_university_organization.rb b/db/migrate/20260119090426_add_booleans_to_university_organization.rb new file mode 100644 index 0000000000..0421a7f5ca --- /dev/null +++ b/db/migrate/20260119090426_add_booleans_to_university_organization.rb @@ -0,0 +1,7 @@ +class AddBooleansToUniversityOrganization < ActiveRecord::Migration[8.0] + def change + add_column :university_organizations, :is_school, :boolean, default: false + add_column :university_organizations, :is_location, :boolean, default: false + add_column :university_organizations, :is_laboratory, :boolean, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 367f7773e2..e0d2b73a9c 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[8.0].define(version: 2026_01_14_132529) do +ActiveRecord::Schema[8.0].define(version: 2026_01_19_090426) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" enable_extension "pg_stat_statements" @@ -2292,6 +2292,9 @@ t.uuid "created_by_id" t.string "bodyclass" t.datetime "deleted_at" + t.boolean "is_school", default: false + t.boolean "is_location", default: false + t.boolean "is_laboratory", default: false t.index ["created_by_id"], name: "index_university_organizations_on_created_by_id" t.index ["university_id"], name: "index_university_organizations_on_university_id" end From 4fe5a927d7fc9f086800e91782e9b5a66abcba18 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Thu, 22 Jan 2026 13:57:03 +0100 Subject: [PATCH 2/8] clean --- .../university/organization/with_facets.rb | 19 +------------- app/models/university/person/with_facets.rb | 25 ++----------------- .../university/person/with_realm_research.rb | 1 + 3 files changed, 4 insertions(+), 41 deletions(-) diff --git a/app/models/university/organization/with_facets.rb b/app/models/university/organization/with_facets.rb index ab1751360d..fc71b00310 100644 --- a/app/models/university/organization/with_facets.rb +++ b/app/models/university/organization/with_facets.rb @@ -11,24 +11,7 @@ module University::Organization::WithFacets scope :locations, -> { where(is_location: true) } scope :schools, -> { where(is_school: true) } scope :laboratories, -> { where(is_laboratory: true) } + # Filters scope :for_facet, -> (facet, language = nil) { where("is_#{facet}": true) } end - - def facets - LIST_OF_FACETS.reject do |facet| - !public_send("is_#{facet}") - end - end - - def location_facets - @location_facets ||= University::Organization::Localization::Location.where(id: localization_ids) - end - - def school_facets - @school_facets ||= University::Organization::Localization::School.where(id: localization_ids) - end - - def laboratory_facets - @laboratory_facets ||= University::Organization::Localization::Laboratory.where(id: localization_ids) - end end \ No newline at end of file diff --git a/app/models/university/person/with_facets.rb b/app/models/university/person/with_facets.rb index d73e7585fe..e15f87d5d6 100644 --- a/app/models/university/person/with_facets.rb +++ b/app/models/university/person/with_facets.rb @@ -15,29 +15,8 @@ module University::Person::WithFacets scope :teachers, -> { where(is_teacher: true) } scope :researchers, -> { where(is_researcher: true) } scope :alumni, -> { where(is_alumnus: true) } - scope :with_habilitation, -> { where(habilitation: true) } - scope :for_facet, -> (facet, language = nil) { where("is_#{facet}": true) } - end - - def facets - LIST_OF_FACETS.reject do |facet| - !public_send("is_#{facet}") - end - end - - def administrator_facets - @administrator_facets ||= University::Person::Localization::Administrator.where(id: localization_ids) - end - def author_facets - @author_facets ||= University::Person::Localization::Author.where(id: localization_ids) - end - - def researcher_facets - @researcher_facets ||= University::Person::Localization::Researcher.where(id: localization_ids) - end - - def teacher_facets - @teacher_facets ||= University::Person::Localization::Teacher.where(id: localization_ids) + # Filters + scope :for_facet, -> (facet, language = nil) { where("is_#{facet}": true) } end end \ No newline at end of file diff --git a/app/models/university/person/with_realm_research.rb b/app/models/university/person/with_realm_research.rb index 2428db0ced..672c9367b7 100644 --- a/app/models/university/person/with_realm_research.rb +++ b/app/models/university/person/with_realm_research.rb @@ -40,6 +40,7 @@ module University::Person::WithRealmResearch through: :research_journal_papers, source: :websites + scope :with_habilitation, -> { where(habilitation: true) } scope :with_hal_identifier, -> { where.not(hal_form_identifier: [nil,'']) } end From d1d1d6be0f9353f6912b1f6f77bf7645d9e91d89 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 23 Jan 2026 11:03:50 +0100 Subject: [PATCH 3/8] fix tests --- Gemfile | 3 ++- Gemfile.lock | 15 +++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 1e1c976731..5d320d528a 100644 --- a/Gemfile +++ b/Gemfile @@ -50,7 +50,8 @@ gem "kamifusen"#, path: "../kamifusen" gem "kaminari" gem "leaflet-rails" gem "libretranslate"#, path: "../libretranslate" -gem "lucide-rails" +gem "lucide-rails" # TODO Seb : Upgrade en Rails 8.1.2 +gem "minitest", "< 6" gem "octokit" gem "omniauth-rails_csrf_protection", "~> 1" gem "omniauth-saml", "~> 2" diff --git a/Gemfile.lock b/Gemfile.lock index da024fcdd9..24650180a7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -125,7 +125,7 @@ GEM activerecord (>= 6.0.0) activesupport (>= 6.0.0) aws-eventstream (1.4.0) - aws-partitions (1.1206.0) + aws-partitions (1.1209.0) aws-sdk-core (3.241.4) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) @@ -167,7 +167,7 @@ GEM addressable (~> 2.3, >= 2.3.0) json (~> 2.1, >= 2.1.0) typhoeus (~> 1.0, >= 1.0.1) - bugsnag (6.28.0) + bugsnag (6.29.0) concurrent-ruby (~> 1.0) builder (3.3.0) byebug (13.0.0) @@ -270,7 +270,7 @@ GEM faraday-gzip (2.0.1) faraday (>= 1.0) zlib (~> 3.0) - faraday-http-cache (2.5.1) + faraday-http-cache (2.6.1) faraday (>= 0.8) faraday-multipart (1.0.4) multipart-post (~> 2) @@ -433,8 +433,7 @@ GEM mini_magick (5.3.1) logger mini_mime (1.1.5) - minitest (6.0.1) - prism (~> 1.5) + minitest (5.27.0) msgpack (1.8.0) multi_xml (0.8.1) bigdecimal (>= 3.1, < 5) @@ -506,7 +505,7 @@ GEM pg (1.6.3-arm64-darwin) pg (1.6.3-x86_64-darwin) pg (1.6.3-x86_64-linux) - pg_query (6.1.0) + pg_query (6.2.1) google-protobuf (>= 3.25.3) pghero (3.7.0) activerecord (>= 7.1) @@ -514,12 +513,11 @@ GEM pp (0.6.3) prettyprint prettyprint (0.2.0) - prism (1.8.0) psych (5.3.1) date stringio public_suffix (7.0.2) - puma (7.1.0) + puma (7.2.0) nio4r (~> 2.0) raabro (1.4.0) racc (1.8.1) @@ -813,6 +811,7 @@ DEPENDENCIES libretranslate listen (~> 3.3) lucide-rails + minitest (< 6) mutex_m (~> 0.3.0) octokit omniauth-rails_csrf_protection (~> 1) From e0781dede04bcd1d825a1bb7d08b3be3840e89d0 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 23 Jan 2026 11:11:52 +0100 Subject: [PATCH 4/8] id --- app/services/migrations/organizations.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/services/migrations/organizations.rb b/app/services/migrations/organizations.rb index 730fc0557d..0b3b288d2f 100644 --- a/app/services/migrations/organizations.rb +++ b/app/services/migrations/organizations.rb @@ -1,5 +1,6 @@ class Migrations::Organizations def self.migrate + puts 'Identifying organizations to merge' University.find_each do |university| locations = university.locations schools = university.schools @@ -8,15 +9,15 @@ def self.migrate puts university puts '--- locations' locations.each do |location| - puts location.original_localization + puts "#{location.original_localization} — #{location.id}" end puts '--- schools' schools.each do |school| - puts school.original_localization + puts "#{school.original_localization} — #{school.id}" end puts '--- laboratories' laboratories.each do |laboratory| - puts laboratory.original_localization + puts "#{laboratory.original_localization} — #{laboratory.id}" end end end From 2c70a08cfb652a9c7da234b95ede4df9713cdbcf Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 23 Jan 2026 11:34:51 +0100 Subject: [PATCH 5/8] oops --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 5d320d528a..cd72c7752b 100644 --- a/Gemfile +++ b/Gemfile @@ -50,8 +50,8 @@ gem "kamifusen"#, path: "../kamifusen" gem "kaminari" gem "leaflet-rails" gem "libretranslate"#, path: "../libretranslate" -gem "lucide-rails" # TODO Seb : Upgrade en Rails 8.1.2 -gem "minitest", "< 6" +gem "lucide-rails" +gem "minitest", "< 6" # TODO Seb : Upgrade en Rails 8.1.2 gem "octokit" gem "omniauth-rails_csrf_protection", "~> 1" gem "omniauth-saml", "~> 2" From 9345c0c6d695da2141b709891573f99da81760f9 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Wed, 24 Jun 2026 08:08:48 +0200 Subject: [PATCH 6/8] merge --- Gemfile.lock | 211 +++++++++++++++++++++++++++------------------------ 1 file changed, 110 insertions(+), 101 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 24650180a7..13ea0cb104 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,17 +1,30 @@ GIT - remote: https://github.com/BaseSecrete/active_hashcash.git - revision: 9dd76d4e9eb9ad622518316564235435d6d32e8f + remote: https://github.com/SebouChu/unsplash_rb.git + revision: 89cd31efed1955430172a4c51d6b8f0b70015404 + branch: ruby-4-compatibility specs: - active_hashcash (0.4.0) - rails (>= 5.2.0) + unsplash (3.1.1) + faraday-multipart (~> 1.0) + httparty (~> 0.20) + oauth2 (>= 2.0.8) + ostruct (~> 0.6) GIT - remote: https://github.com/jquery-ui-rails/jquery-ui-rails.git - revision: 413265e81f790f795239e07e7e25e01429b2f18d - tag: v7.0.0 + remote: https://github.com/jaimeiniesta/metainspector.git + revision: 1d2cb50df7b0d60bd2d7a3e83751accda581e78c specs: - jquery-ui-rails (7.0.0) - railties (>= 3.2.16) + metainspector (5.17.2) + addressable (~> 2.9.0) + faraday (~> 2.5) + faraday-cookie_jar (~> 0.0) + faraday-encoding (~> 0.0) + faraday-follow_redirects (~> 0.3) + faraday-gzip (>= 0.1, < 4.0) + faraday-http-cache (~> 2.5) + faraday-retry (~> 2.0) + fastimage (~> 2.2) + nesty (~> 1.0) + nokogiri (~> 1.19.0) GIT remote: https://github.com/noesya/summernote-rails.git @@ -36,29 +49,31 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (8.0.4) - actionpack (= 8.0.4) - activesupport (= 8.0.4) + action_text-trix (2.1.19) + railties + actioncable (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.4) - actionpack (= 8.0.4) - activejob (= 8.0.4) - activerecord (= 8.0.4) - activestorage (= 8.0.4) - activesupport (= 8.0.4) + actionmailbox (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) mail (>= 2.8.0) - actionmailer (8.0.4) - actionpack (= 8.0.4) - actionview (= 8.0.4) - activejob (= 8.0.4) - activesupport (= 8.0.4) + actionmailer (8.1.3) + actionpack (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activesupport (= 8.1.3) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.4) - actionview (= 8.0.4) - activesupport (= 8.0.4) + actionpack (8.1.3) + actionview (= 8.1.3) + activesupport (= 8.1.3) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -66,51 +81,54 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.4) - actionpack (= 8.0.4) - activerecord (= 8.0.4) - activestorage (= 8.0.4) - activesupport (= 8.0.4) + actiontext (8.1.3) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.4) - activesupport (= 8.0.4) + actionview (8.1.3) + activesupport (= 8.1.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) + active_hashcash (0.4.0) + rails (>= 5.2.0) active_storage_validations (1.4.0) activejob (>= 6.1.4) activemodel (>= 6.1.4) activestorage (>= 6.1.4) activesupport (>= 6.1.4) marcel (>= 1.0.3) - activejob (8.0.4) - activesupport (= 8.0.4) + activejob (8.1.3) + activesupport (= 8.1.3) globalid (>= 0.3.6) - activemodel (8.0.4) - activesupport (= 8.0.4) - activerecord (8.0.4) - activemodel (= 8.0.4) - activesupport (= 8.0.4) + activemodel (8.1.3) + activesupport (= 8.1.3) + activerecord (8.1.3) + activemodel (= 8.1.3) + activesupport (= 8.1.3) timeout (>= 0.4.0) - activestorage (8.0.4) - actionpack (= 8.0.4) - activejob (= 8.0.4) - activerecord (= 8.0.4) - activesupport (= 8.0.4) + activestorage (8.1.3) + actionpack (= 8.1.3) + activejob (= 8.1.3) + activerecord (= 8.1.3) + activesupport (= 8.1.3) marcel (~> 1.0) activestorage-scaleway-service (1.1.0) activestorage aws-sdk-s3 - activesupport (8.0.4) + activesupport (8.1.3) base64 - benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json logger (>= 1.4.2) minitest (>= 5.1) securerandom (>= 0.3) @@ -119,7 +137,7 @@ GEM add_to_calendar (0.5.1) tzinfo (>= 1.1, < 3) tzinfo-data (~> 1.2020) - addressable (2.8.8) + addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) annotaterb (4.20.0) activerecord (>= 6.0.0) @@ -145,7 +163,6 @@ GEM aws-eventstream (~> 1, >= 1.0.2) base64 (0.3.0) bcrypt (3.1.21) - benchmark (0.5.0) better_errors (2.10.1) erubi (>= 1.0.0) rack (>= 0.9.0) @@ -190,6 +207,8 @@ GEM caxlsx_rails (0.6.4) actionpack (>= 3.1) caxlsx (>= 3.0) + cgi (0.5.2) + chartkick (5.2.1) citeproc (1.1.0) date forwardable @@ -267,13 +286,13 @@ GEM faraday faraday-follow_redirects (0.5.0) faraday (>= 1, < 3) - faraday-gzip (2.0.1) - faraday (>= 1.0) + faraday-gzip (3.1.0) + faraday (>= 2.0, < 3) zlib (~> 3.0) faraday-http-cache (2.6.1) faraday (>= 0.8) - faraday-multipart (1.0.4) - multipart-post (~> 2) + faraday-multipart (1.2.0) + multipart-post (~> 2.0) faraday-net_http (3.4.2) net-http (~> 0.5) faraday-retry (2.4.0) @@ -320,6 +339,9 @@ GEM fugit (>= 1.11.0) railties (>= 6.1.0) thor (>= 1.0.0) + google-protobuf (4.33.4) + bigdecimal + rake (>= 13) google-protobuf (4.33.4-arm64-darwin) bigdecimal rake (>= 13) @@ -370,6 +392,8 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) + jquery-ui-rails (8.0.0) + railties (>= 3.2.16) jsbundling-rails (1.3.1) railties (>= 6.0.0) json (2.18.0) @@ -393,6 +417,8 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) + languagetool-widget (8.3.4) + rails leaflet-rails (1.9.5) actionpack (>= 4.2.0) railties (>= 4.2.0) @@ -418,18 +444,6 @@ GEM net-smtp marcel (1.1.0) matrix (0.4.3) - metainspector (5.16.0) - addressable (~> 2.8.4) - faraday (~> 2.5) - faraday-cookie_jar (~> 0.0) - faraday-encoding (~> 0.0) - faraday-follow_redirects (~> 0.3) - faraday-gzip (>= 0.1, < 3.0) - faraday-http-cache (~> 2.5) - faraday-retry (~> 2.0) - fastimage (~> 2.2) - nesty (~> 1.0) - nokogiri (~> 1.18.8) mini_magick (5.3.1) logger mini_mime (1.1.5) @@ -454,11 +468,11 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.5) - nokogiri (1.18.10-arm64-darwin) + nokogiri (1.19.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.10-x86_64-darwin) + nokogiri (1.19.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) + nokogiri (1.19.4-x86_64-linux-gnu) racc (~> 1.4) oauth (1.1.3) base64 (~> 0.1) @@ -484,9 +498,6 @@ GEM logger rack (>= 2.2.3) rack-protection - omniauth-rails_csrf_protection (1.0.2) - actionpack (>= 4.2) - omniauth (~> 2.0) omniauth-saml (2.2.4) omniauth (~> 2.1) ruby-saml (~> 1.18) @@ -494,7 +505,6 @@ GEM stringio time uri - openssl (3.3.2) orm_adapter (0.5.0) orthotypo (2.0.0) ostruct (0.6.3) @@ -536,20 +546,20 @@ GEM rack-timeout (0.7.0) rackup (2.3.1) rack (>= 3) - rails (8.0.4) - actioncable (= 8.0.4) - actionmailbox (= 8.0.4) - actionmailer (= 8.0.4) - actionpack (= 8.0.4) - actiontext (= 8.0.4) - actionview (= 8.0.4) - activejob (= 8.0.4) - activemodel (= 8.0.4) - activerecord (= 8.0.4) - activestorage (= 8.0.4) - activesupport (= 8.0.4) + rails (8.1.3) + actioncable (= 8.1.3) + actionmailbox (= 8.1.3) + actionmailer (= 8.1.3) + actionpack (= 8.1.3) + actiontext (= 8.1.3) + actionview (= 8.1.3) + activejob (= 8.1.3) + activemodel (= 8.1.3) + activerecord (= 8.1.3) + activestorage (= 8.1.3) + activesupport (= 8.1.3) bundler (>= 1.15.0) - railties (= 8.0.4) + railties (= 8.1.3) rails-autocomplete (2.0.1) rails (>= 4.0) rails-dom-testing (2.3.0) @@ -562,9 +572,9 @@ GEM rails-i18n (8.1.0) i18n (>= 0.7, < 2) railties (>= 8.0.0, < 9) - railties (8.0.4) - actionpack (= 8.0.4) - activesupport (= 8.0.4) + railties (8.1.3) + actionpack (= 8.1.3) + activesupport (= 8.1.3) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -713,10 +723,6 @@ GEM unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.2.0) - unsplash (3.1.1) - faraday-multipart (~> 1.0.4) - httparty (~> 0.20) - oauth2 (>= 2.0.8) uri (1.1.1) useragent (0.16.11) vcr (6.4.0) @@ -758,10 +764,11 @@ PLATFORMS arm64-darwin-25 x86_64-darwin-23 x86_64-darwin-24 + x86_64-darwin-25 x86_64-linux DEPENDENCIES - active_hashcash! + active_hashcash active_storage_validations (~> 1) activestorage-scaleway-service add_to_calendar @@ -779,6 +786,8 @@ DEPENDENCIES cancancan (~> 3.3.0) capybara (>= 3.26) caxlsx_rails (~> 0) + cgi (~> 0.5.1) + chartkick (~> 5.0) citeproc (~> 1) citeproc-ruby (~> 2) cocoon (~> 1) @@ -796,29 +805,28 @@ DEPENDENCIES geocoder (~> 1) gitlab good_job (~> 4) - hal_openscience (~> 0) + hal_openscience i18n_data (~> 0) i18n_date_range image_processing invisible_captcha (~> 2.3) jbuilder jquery-rails - jquery-ui-rails! + jquery-ui-rails (~> 8.0) jsbundling-rails (~> 1.3) kamifusen kaminari + languagetool-widget leaflet-rails libretranslate listen (~> 3.3) lucide-rails + metainspector! minitest (< 6) mutex_m (~> 0.3.0) octokit - omniauth-rails_csrf_protection (~> 1) omniauth-saml (~> 2) - openssl (~> 3.3) orthotypo - ostruct (~> 0.6.0) paranoia pexels (~> 0) pg (~> 1) @@ -827,7 +835,7 @@ DEPENDENCIES puma rack-mini-profiler (~> 3.0) rack-timeout - rails (~> 8.0.2) + rails (~> 8.1.2) rails-autocomplete (~> 2) rails-i18n rbnacl (~> 7.1) @@ -835,6 +843,7 @@ DEPENDENCIES roo (~> 2) rspec-rails rswag (~> 2) + ruby-vips (~> 2.3) sanitize sassc-rails selenium-webdriver @@ -848,7 +857,7 @@ DEPENDENCIES summernote-rails! two_factor_authentication! tzinfo-data - unsplash + unsplash! vcr vimeo web-console (>= 4.1.0) @@ -856,7 +865,7 @@ DEPENDENCIES webmock RUBY VERSION - ruby 3.4.7p58 + ruby 4.0.3p0 BUNDLED WITH 2.7.2 From 2b7f74bff2abb4b8e0987137ade8e08e81ddb3dd Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Wed, 24 Jun 2026 08:13:11 +0200 Subject: [PATCH 7/8] fix --- app/models/university/person/with_facets.rb | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/models/university/person/with_facets.rb b/app/models/university/person/with_facets.rb index e15f87d5d6..79a392e5ca 100644 --- a/app/models/university/person/with_facets.rb +++ b/app/models/university/person/with_facets.rb @@ -19,4 +19,27 @@ module University::Person::WithFacets # Filters scope :for_facet, -> (facet, language = nil) { where("is_#{facet}": true) } end + + def facets + LIST_OF_FACETS.reject do |facet| + !public_send("is_#{facet}") + end + end + + def administrator_facets + @administrator_facets ||= University::Person::Localization::Administrator.where(id: localization_ids) + end + + def author_facets + @author_facets ||= University::Person::Localization::Author.where(id: localization_ids) + end + + def researcher_facets + @researcher_facets ||= University::Person::Localization::Researcher.where(id: localization_ids) + end + + def teacher_facets + @teacher_facets ||= University::Person::Localization::Teacher.where(id: localization_ids) + end + end \ No newline at end of file From dad96301130d89bc78c25b89a1134f831940e776 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Wed, 24 Jun 2026 08:15:58 +0200 Subject: [PATCH 8/8] schema --- app/models/university/person/with_facets.rb | 1 - db/schema.rb | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/models/university/person/with_facets.rb b/app/models/university/person/with_facets.rb index 79a392e5ca..4d93b40ba4 100644 --- a/app/models/university/person/with_facets.rb +++ b/app/models/university/person/with_facets.rb @@ -41,5 +41,4 @@ def researcher_facets def teacher_facets @teacher_facets ||= University::Person::Localization::Teacher.where(id: localization_ids) end - end \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 82856e5425..63ff855fdb 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[8.1].define(version: 2026_06_18_144210) do +ActiveRecord::Schema[8.1].define(version: 2026_06_23_120000) do # These are extensions that must be enabled in order to support this database enable_extension "pg_catalog.plpgsql" enable_extension "pg_stat_statements" @@ -159,6 +159,7 @@ t.string "html_class" t.jsonb "metadata" t.string "migration_identifier" + t.boolean "native", default: false t.integer "position", null: false t.boolean "published", default: true t.integer "template_kind", default: 0, null: false @@ -2299,16 +2300,13 @@ t.uuid "created_by_id" t.datetime "deleted_at" t.string "email" + t.boolean "is_laboratory", default: false + t.boolean "is_location", default: false + t.boolean "is_school", default: false t.integer "kind", default: 10 t.float "latitude" t.float "longitude" t.string "migration_identifier" - t.uuid "created_by_id" - t.string "bodyclass" - t.datetime "deleted_at" - t.boolean "is_school", default: false - t.boolean "is_location", default: false - t.boolean "is_laboratory", default: false t.string "nic" t.string "phone" t.string "siren"