diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index 2f40b095a292ec45ee82e182136ea5c6634632bd..987ea75731b6af35d909dd2176b87360fdec25e2 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -51,6 +51,6 @@ class Admin::Communication::WebsitesController < Admin::Communication::Applicati end def website_params - params.require(:communication_website).permit(:name, :domain, :repository, :access_token) + params.require(:communication_website).permit(:name, :domain, :repository, :access_token, :about_type, :about_id) end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9af4384ebfca34d9d01abfa063c109e882d41ddf..5e9e5eb444157ef7c7a37fa179bba13e76fdf5ff 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,5 @@ class ApplicationController < ActionController::Base - include WithContext + include WithUniversity def breadcrumb add_breadcrumb t('home'), root_path diff --git a/app/controllers/application_controller/with_context.rb b/app/controllers/application_controller/with_context.rb deleted file mode 100644 index 73688317f1b920df823addacbacd1ff96f126a72..0000000000000000000000000000000000000000 --- a/app/controllers/application_controller/with_context.rb +++ /dev/null @@ -1,28 +0,0 @@ -module ApplicationController::WithContext - extend ActiveSupport::Concern - - included do - - def current_university - @current_university ||= current_website ? current_website.university - : University.with_host(request.host) - end - helper_method :current_university - - def current_website - @current_website ||= Communication::Website.with_host(request.host) - end - helper_method :current_website - - def is_university? - @is_university ||= !University.with_host(request.host).nil? - end - helper_method :is_university? - - def is_website? - @is_website ||= !Communication::Website.with_host(request.host).nil? - end - helper_method :is_website? - - end -end diff --git a/app/controllers/application_controller/with_university.rb b/app/controllers/application_controller/with_university.rb new file mode 100644 index 0000000000000000000000000000000000000000..8e9b06f0b33fbc5b70820edc901947526031f329 --- /dev/null +++ b/app/controllers/application_controller/with_university.rb @@ -0,0 +1,10 @@ +module ApplicationController::WithUniversity + extend ActiveSupport::Concern + + included do + def current_university + @current_university ||= University.with_host(request.host) + end + helper_method :current_university + end +end diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index c5ac8d1d5183b4208197c33aaebab11dabfaabac..1964228e7fcb22abdb19e311a69c7264dba7d9a9 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -3,16 +3,19 @@ # Table name: communication_websites # # id :uuid not null, primary key +# about_type :string # access_token :string # domain :string # name :string # repository :string # created_at :datetime not null # updated_at :datetime not null +# about_id :uuid # university_id :uuid not null # # Indexes # +# index_communication_websites_on_about (about_type,about_id) # index_communication_websites_on_university_id (university_id) # # Foreign Keys @@ -21,32 +24,15 @@ # class Communication::Website < ApplicationRecord belongs_to :university + belongs_to :about, polymorphic: true, optional: true has_many :pages, foreign_key: :communication_website_id - def self.with_host(host) - find_by domain: extract_domain_from(host) - end - - # Website domain - # Production with domain www.iut.u-bordeaux-montaigne.fr - # Production without www.iut.u-bordeaux-montaigne.fr.websites.osuny.org - # Staging www.iut.u-bordeaux-montaigne.fr.websites.osuny.dev - # Dev www.iut.u-bordeaux-montaigne.fr.websites.osuny - def self.extract_domain_from(host) - host.remove('.websites.osuny.org') - .remove('.websites.osuny.dev') - .remove('.websites.osuny') + def self.about_types + [nil, :research_journal, :school] end def domain_url - case Rails.env - when 'development' - "http://#{domain}.websites.osuny:3000" - when 'staging' - "https://#{domain}.websites.osuny.dev" - when 'production' - "https://#{domain}" - end + "https://#{ domain }" end def to_s diff --git a/app/views/admin/communication/websites/_form.html.erb b/app/views/admin/communication/websites/_form.html.erb index a4161a45d4b6640c02802c2ea9aa47cd427d4cc8..09160d49c9bb9642bcc9b067b88bd7b55dddf0cc 100644 --- a/app/views/admin/communication/websites/_form.html.erb +++ b/app/views/admin/communication/websites/_form.html.erb @@ -2,6 +2,12 @@ <div class="row"> <div class="col-md-4"> <%= f.input :name %> + <%= f.input :about_type, + collection: Communication::Website.about_types, + label_method: lambda { |object| + I18n.t("activerecord.attributes.communication/website.about_#{object}") + }, + include_blank: false %> </div> <div class="col-md-4"> <%= f.input :domain %> diff --git a/app/views/admin/communication/websites/index.html.erb b/app/views/admin/communication/websites/index.html.erb index 9fbf772c39683fc9aadc303a10b283e329d5dc21..fd54aa8fc79d850b2a4f868834c7948852c5f7ea 100644 --- a/app/views/admin/communication/websites/index.html.erb +++ b/app/views/admin/communication/websites/index.html.erb @@ -5,7 +5,8 @@ <tr> <th><%= Communication::Website.human_attribute_name('name') %></th> <th><%= Communication::Website.human_attribute_name('domain') %></th> - <th><%= Communication::Website.human_attribute_name('pages') %></th> + <th><%= Communication::Website.human_attribute_name('about_type') %></th> + <th><%= Communication::Website.human_attribute_name('about') %></th> <th></th> </tr> </thead> @@ -14,7 +15,8 @@ <tr> <td><%= link_to website, [:admin, website] %></td> <td><%= link_to website.domain_url, website.domain_url, target: :_blank %></td> - <td><%= website.pages.count %></td> + <td><%= I18n.t("activerecord.attributes.communication/website.about_#{website.about_type}") %></td> + <td><%= website.about %></td> <td class="text-end"> <%= edit_link website %> <%= destroy_link website %> diff --git a/app/views/communication/website/pages/_communication_website_page.json.jbuilder b/app/views/communication/website/pages/_communication_website_page.json.jbuilder deleted file mode 100644 index 76353d73cf41c3b844d27107ab9829c7461829a6..0000000000000000000000000000000000000000 --- a/app/views/communication/website/pages/_communication_website_page.json.jbuilder +++ /dev/null @@ -1,2 +0,0 @@ -json.extract! communication_website_page, :id, :university_id, :communication_website_id, :title, :description, :kind, :about_id, :created_at, :updated_at -json.url communication_website_page_url(communication_website_page, format: :json) diff --git a/app/views/communication/website/pages/index.html.erb b/app/views/communication/website/pages/index.html.erb deleted file mode 100644 index d3ac7cc092280b54d6403d6db604ff3a03ccd20b..0000000000000000000000000000000000000000 --- a/app/views/communication/website/pages/index.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -<% content_for :title, Communication::Website::Page.model_name.human(count: 2) %> - -<table class="table"> - <thead> - <tr> - <th>Title</th> - <th>Description</th> - <th>Path</th> - </tr> - </thead> - <tbody> - <% @pages.each do |page| %> - <tr> - <td><%= link_to page, page %></td> - <td><%= page.description %></td> - <td><%= page.path %></td> - </tr> - <% end %> - </tbody> -</table> diff --git a/app/views/communication/website/pages/index.json.jbuilder b/app/views/communication/website/pages/index.json.jbuilder deleted file mode 100644 index 1f1ff9a1a99f82c4e67d66577f1ecefe2d33699f..0000000000000000000000000000000000000000 --- a/app/views/communication/website/pages/index.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.array! @communication_website_pages, partial: "communication_website_pages/communication_website_page", as: :communication_website_page diff --git a/app/views/communication/website/pages/show.html.erb b/app/views/communication/website/pages/show.html.erb deleted file mode 100644 index 0a4c0bc99fa4df5837765dc998d1ef07febfda2e..0000000000000000000000000000000000000000 --- a/app/views/communication/website/pages/show.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<% content_for :title, @page %> - -<%= @page.description %> diff --git a/app/views/communication/website/pages/show.json.jbuilder b/app/views/communication/website/pages/show.json.jbuilder deleted file mode 100644 index 56fa105a1677cae225cafe1ccca833875e00e707..0000000000000000000000000000000000000000 --- a/app/views/communication/website/pages/show.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.partial! "communication_website_pages/communication_website_page", communication_website_page: @communication_website_page diff --git a/app/views/research/journal/articles/_volume.html.erb b/app/views/research/journal/articles/_volume.html.erb deleted file mode 100644 index dccb276fb27ec63a808aee28d701559c19171c6c..0000000000000000000000000000000000000000 --- a/app/views/research/journal/articles/_volume.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<article class="card mt-4"> - <div class="card-body"> - <h1 class="h4"> - <%= link_to volume, - research_journal_volume_path(journal_id: volume.journal, id: volume), - class: 'stretched-link' %> - </h1> - </div> -</article> diff --git a/app/views/research/journal/articles/index.html.erb b/app/views/research/journal/articles/index.html.erb deleted file mode 100644 index 6308ba227d8094b85a580897367ccdba3e3f9f44..0000000000000000000000000000000000000000 --- a/app/views/research/journal/articles/index.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -<% content_for :title, Research::Journal::Article.model_name.human(count: 2) %> - -<h1><%= Research::Journal::Article.model_name.human(count: 2) %></h1> - -<table class="table"> - <tbody> - <% @articles.each do |article| %> - <tr> - <td><%= link_to article, research_journal_article_path(journal_id: @journal.id, id: article.id) %></td> - </tr> - <% end %> - </tbody> -</table> diff --git a/app/views/research/journal/articles/index.json.jbuilder b/app/views/research/journal/articles/index.json.jbuilder deleted file mode 100644 index 2f50f62c784732bebe0dd231511f64337ad06739..0000000000000000000000000000000000000000 --- a/app/views/research/journal/articles/index.json.jbuilder +++ /dev/null @@ -1,4 +0,0 @@ -json.array! @articles do |article| - json.extract! article, :id, :title, :text, :published_at - json.url research_journal_article_url(journal_id: article.journal, id: article, format: :json) -end diff --git a/app/views/research/journal/articles/show.html.erb b/app/views/research/journal/articles/show.html.erb deleted file mode 100644 index eea345529cef9c7cc2387c35d187d2954083dfce..0000000000000000000000000000000000000000 --- a/app/views/research/journal/articles/show.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% content_for :title, @article %> - -<h1><%= @article.title %></h1> - -<p><%= @article.published_at %></p> - -<%= @article.text.html_safe %> diff --git a/app/views/research/journal/articles/show.json.jbuilder b/app/views/research/journal/articles/show.json.jbuilder deleted file mode 100644 index 6b2cdca9a68a0319ee31c1d0feddbaecd9e05c03..0000000000000000000000000000000000000000 --- a/app/views/research/journal/articles/show.json.jbuilder +++ /dev/null @@ -1,8 +0,0 @@ -json.extract! @article, :id, :title, :text, :published_at -if @article.volume - json.volume do - json.extract! @article.volume, :id, :title, :number, :published_at - json.url research_journal_volume_url(journal: @volume.journal, id: @volume, format: :json) - - end -end diff --git a/app/views/research/journal/volumes/_volume.html.erb b/app/views/research/journal/volumes/_volume.html.erb deleted file mode 100644 index 30603618bd8640298c65688aecdc1ace5af256ea..0000000000000000000000000000000000000000 --- a/app/views/research/journal/volumes/_volume.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<article class="card mt-4 border-0"> - <img src="https://picsum.photos/200/300" alt="<%= volume %>"> - <h1 class="h5 mt-3"> - <%= link_to volume, - research_journal_volume_path(journal_id: volume.journal, id: volume), - class: 'stretched-link' %> - </h1> -</article> diff --git a/app/views/research/journal/volumes/index.html.erb b/app/views/research/journal/volumes/index.html.erb deleted file mode 100644 index 47fdd67030ccbb54f2ada13919fcad9bfb44bc03..0000000000000000000000000000000000000000 --- a/app/views/research/journal/volumes/index.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<% content_for :title, Research::Journal::Volume.model_name.human(count: 2) %> - -<div class="row"> - <% @journal.volumes.each do |volume| %> - <div class="col-md-3"> - <%= render volume %> - </div> - <% end %> -</div> diff --git a/app/views/research/journal/volumes/index.json.jbuilder b/app/views/research/journal/volumes/index.json.jbuilder deleted file mode 100644 index 3894f90d2aa95cf8534049e700195c241341ec18..0000000000000000000000000000000000000000 --- a/app/views/research/journal/volumes/index.json.jbuilder +++ /dev/null @@ -1,4 +0,0 @@ -json.array! @volumes do |volume| - json.extract! volume, :id, :title, :number, :published_at - json.url research_journal_volume_url(journal_id: volume.journal, id: volume, format: :json) -end diff --git a/app/views/research/journal/volumes/show.html.erb b/app/views/research/journal/volumes/show.html.erb deleted file mode 100644 index ec07c92fa125d748850068d1c4e950627b6bba1e..0000000000000000000000000000000000000000 --- a/app/views/research/journal/volumes/show.html.erb +++ /dev/null @@ -1,20 +0,0 @@ -<% content_for :title, @volume %> - -<h1><%= @volume.title %></h1> - -<p>#<%= @volume.number %></p> - -<p> - <%= @volume.published_at&.to_date %> -</p> - -<h2><%= Research::Journal::Article.model_name.human(count: 2) %></h2> -<table class="table"> - <tbody> - <% @articles.each do |article| %> - <tr> - <td><%= link_to article, research_journal_article_path(journal_id: @journal.id, id: article.id) %></td> - </tr> - <% end %> - </tbody> -</table> diff --git a/app/views/research/journal/volumes/show.json.jbuilder b/app/views/research/journal/volumes/show.json.jbuilder deleted file mode 100644 index 298b2d7d48038e041d811580421b7aa0a49bb280..0000000000000000000000000000000000000000 --- a/app/views/research/journal/volumes/show.json.jbuilder +++ /dev/null @@ -1,6 +0,0 @@ -json.extract! @volume, :id, :title, :number, :published_at -json.url research_journal_volume_url(journal: @volume.journal, id: @volume, format: :json) -json.articles @volume.articles do |article| - json.extract! article, :id, :title, :published_at - json.url research_journal_article_url(journal_id: article.journal, id: article, format: :json) -end diff --git a/app/views/research/journals/index.html.erb b/app/views/research/journals/index.html.erb deleted file mode 100644 index 48478c237547ce1aed778c4285565f674bd66697..0000000000000000000000000000000000000000 --- a/app/views/research/journals/index.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<% content_for :title, Research::Journal.model_name.human(count: 2) %> - -<h1><%= Research::Journal.model_name.human(count: 2) %></h1> - -<% @journals.each do |journal| %> - <div class="row"> - <div class="col-md-8"> - <h2 class="mt-5"><%= journal %></h2> - <p><%= journal.description %></p> - <%= link_to 'Lire', journal, class: 'btn btn-primary stretched-link' %> - </div> - <div class="offset-md-1 col-md-3"> - <%= render journal.volumes.first if journal.volumes.any? %> - </div> - </div> -<% end %> diff --git a/app/views/research/journals/index.json.jbuilder b/app/views/research/journals/index.json.jbuilder deleted file mode 100644 index 465e2b7ccab013fdc6b4baa5f45fa8041b988947..0000000000000000000000000000000000000000 --- a/app/views/research/journals/index.json.jbuilder +++ /dev/null @@ -1,4 +0,0 @@ -json.array! @journals do |journal| - json.extract! journal, :id, :title, :description - json.url research_journal_url(journal, format: :json) -end diff --git a/app/views/research/journals/show.html.erb b/app/views/research/journals/show.html.erb deleted file mode 100644 index 707d4f0ce7d3bff706c0eada31a9e7a8e159b68e..0000000000000000000000000000000000000000 --- a/app/views/research/journals/show.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -<% content_for :title, @journal %> - -<div class="row"> - <div class="col-md-8"> - <h1><%= @journal %></h1> - <p><%= @journal.description %></p> - </div> -</div> - -<h2><%= Research::Journal::Volume.model_name.human(count: 2) %></h2> -<div class="row"> - <% @journal.volumes.each do |volume| %> - <div class="col-md-3"> - <%= render volume %> - </div> - <% end %> -</div> - -<h2><%= Research::Journal::Article.model_name.human(count: 2) %></h2> -<table class="table"> - <tbody> - <% @journal.articles.each do |article| %> - <tr> - <td><%= link_to article, research_journal_article_path(journal_id: @journal.id, id: article.id) %></td> - </tr> - <% end %> - </tbody> -</table> diff --git a/app/views/research/journals/show.json.jbuilder b/app/views/research/journals/show.json.jbuilder deleted file mode 100644 index 1dd8bbd7c7fcd402c6b39561e9c9311056590992..0000000000000000000000000000000000000000 --- a/app/views/research/journals/show.json.jbuilder +++ /dev/null @@ -1,10 +0,0 @@ -json.extract! @journal, :id, :title, :description -json.url research_journal_url(@journal, format: :json) -json.volumes @journal.volumes do |volume| - json.extract! volume, :id, :title, :published_at - json.url research_journal_volume_url(journal_id: volume.journal, id: volume, format: :json) -end -json.articles @journal.articles do |article| - json.extract! article, :id, :title, :published_at - json.url research_journal_article_url(journal_id: article.journal, id: article, format: :json) -end diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 474e8cd1c45b71c1ce95a90ee1509b2bbe29f318..cb8b9613525c0556013a4770bcbc19032a27eb00 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -14,3 +14,7 @@ fr: communication/website: name: Nom domain: Domaine + about_type: Sujet du site + about_: Aucun sujet (site indépendant) + about_research_journal: Site de revue scientifique + about_school: Site d'école diff --git a/config/routes.rb b/config/routes.rb index a77f1b43c3fa966df6cc89e422e2a46642dd290d..92dfc427ed9c6db9a6c6e52eb1b904313641db7c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,13 +4,19 @@ Rails.application.routes.draw do sessions: 'users/sessions' } - draw 'admin' - draw 'server' + namespace :admin do + resources :users + draw 'education' + draw 'research' + draw 'communication' + draw 'administration' + root to: 'dashboard#index' + end - draw 'education' - draw 'research' - draw 'communication' - draw 'administration' + namespace :server do + resources :universities + root to: 'dashboard#index' + end - root to: 'communication/website/pages#index' + root to: 'admin/dashboard#index' end diff --git a/config/routes/admin.rb b/config/routes/admin.rb deleted file mode 100644 index ad026bc2aadb767cd3e611144fb8cadfe2b054c6..0000000000000000000000000000000000000000 --- a/config/routes/admin.rb +++ /dev/null @@ -1,8 +0,0 @@ -namespace :admin do - resources :users - draw 'admin/education' - draw 'admin/research' - draw 'admin/communication' - draw 'admin/administration' - root to: 'dashboard#index' -end diff --git a/config/routes/admin/administration.rb b/config/routes/admin/administration.rb deleted file mode 100644 index f5b69fe50d8ccc61e2d3a2873a87271df524af51..0000000000000000000000000000000000000000 --- a/config/routes/admin/administration.rb +++ /dev/null @@ -1,6 +0,0 @@ -namespace :administration do - namespace :qualiopi do - resources :criterions, only: [:index, :show] - resources :indicators, only: [:index, :show] - end -end diff --git a/config/routes/admin/communication.rb b/config/routes/admin/communication.rb deleted file mode 100644 index 2568a32658cec2be3037135d97d46121decde9b4..0000000000000000000000000000000000000000 --- a/config/routes/admin/communication.rb +++ /dev/null @@ -1,5 +0,0 @@ -namespace :communication do - resources :websites do - resources :pages, controller: 'website/pages' - end -end diff --git a/config/routes/admin/education.rb b/config/routes/admin/education.rb deleted file mode 100644 index c6f58926f146a580495fc6c75d818000dd9ba9dd..0000000000000000000000000000000000000000 --- a/config/routes/admin/education.rb +++ /dev/null @@ -1,3 +0,0 @@ -namespace :education do - resources :programs -end diff --git a/config/routes/admin/research.rb b/config/routes/admin/research.rb deleted file mode 100644 index 1bec5b3fc8e4879197562134836190dd338ec56e..0000000000000000000000000000000000000000 --- a/config/routes/admin/research.rb +++ /dev/null @@ -1,6 +0,0 @@ -namespace :research do - resources :journals do - resources :volumes, controller: 'journal/volumes' - resources :articles, controller: 'journal/articles' - end -end diff --git a/config/routes/administration.rb b/config/routes/administration.rb index a7f66bc51a434fa256670b74cda14178efe79692..f5b69fe50d8ccc61e2d3a2873a87271df524af51 100644 --- a/config/routes/administration.rb +++ b/config/routes/administration.rb @@ -1,3 +1,6 @@ namespace :administration do - + namespace :qualiopi do + resources :criterions, only: [:index, :show] + resources :indicators, only: [:index, :show] + end end diff --git a/config/routes/communication.rb b/config/routes/communication.rb index 8cb89f645979e2071d90dee9d44117f98457f6d0..2568a32658cec2be3037135d97d46121decde9b4 100644 --- a/config/routes/communication.rb +++ b/config/routes/communication.rb @@ -1,5 +1,5 @@ namespace :communication do - namespace :website do - resources :pages, only: [:index, :show] + resources :websites do + resources :pages, controller: 'website/pages' end end diff --git a/config/routes/education.rb b/config/routes/education.rb index ff0e30c2ff3a121fb19a3c81c2248dafed8d6992..c6f58926f146a580495fc6c75d818000dd9ba9dd 100644 --- a/config/routes/education.rb +++ b/config/routes/education.rb @@ -1,3 +1,3 @@ namespace :education do - resources :programs, only: [:index, :show] + resources :programs end diff --git a/config/routes/research.rb b/config/routes/research.rb index e7eb2815ace9bbd15149e25cc1881007104c0df5..1bec5b3fc8e4879197562134836190dd338ec56e 100644 --- a/config/routes/research.rb +++ b/config/routes/research.rb @@ -1,6 +1,6 @@ namespace :research do - resources :journals, only: [:index, :show] do - resources :volumes, only: [:index, :show], controller: 'journal/volumes' - resources :articles, only: [:index, :show], controller: 'journal/articles' + resources :journals do + resources :volumes, controller: 'journal/volumes' + resources :articles, controller: 'journal/articles' end end diff --git a/config/routes/server.rb b/config/routes/server.rb deleted file mode 100644 index ce69e968b0edf76cbeff45d7d5e91daafe69758f..0000000000000000000000000000000000000000 --- a/config/routes/server.rb +++ /dev/null @@ -1,4 +0,0 @@ -namespace :server do - resources :universities - root to: 'dashboard#index' -end diff --git a/db/migrate/20210906121013_add_about_to_communication_websites.rb b/db/migrate/20210906121013_add_about_to_communication_websites.rb new file mode 100644 index 0000000000000000000000000000000000000000..88d1cde9b7c85dc8ea7439d95e93e2856a2cfc5e --- /dev/null +++ b/db/migrate/20210906121013_add_about_to_communication_websites.rb @@ -0,0 +1,5 @@ +class AddAboutToCommunicationWebsites < ActiveRecord::Migration[6.1] + def change + add_reference :communication_websites, :about, polymorphic: true, null: true, type: :uuid + end +end diff --git a/db/schema.rb b/db/schema.rb index 9066a2fdce1eca9fca85453634e4815cfd9a137a..2a1d9a288d900df4aedec7878a452bfdbcf58699 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.define(version: 2021_09_06_074132) do +ActiveRecord::Schema.define(version: 2021_09_06_121013) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -66,6 +66,9 @@ ActiveRecord::Schema.define(version: 2021_09_06_074132) do t.datetime "updated_at", precision: 6, null: false t.string "access_token" t.string "repository" + t.string "about_type" + t.uuid "about_id" + t.index ["about_type", "about_id"], name: "index_communication_websites_on_about" t.index ["university_id"], name: "index_communication_websites_on_university_id" end