From c5018e4a53db9d8a42383bc83394c39577b09721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 22 Feb 2025 23:29:05 +0100 Subject: [PATCH] Remove obsolete video_url column in poll_questions table This column isn't used since commit 4c0deb0ec because administrators can associate videos to the answers since commit 5862eea51. The value of this attribute isn't used in the public area since commit 8277e3cc2. --- app/views/admin/poll/questions/show.html.erb | 8 -------- config/locales/en/admin.yml | 1 - config/locales/es/admin.yml | 1 - .../20250222222739_remove_poll_questions_video_url.rb | 5 +++++ db/schema.rb | 3 +-- 5 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 db/migrate/20250222222739_remove_poll_questions_video_url.rb diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb index 1cb73202a..35b09b9f9 100644 --- a/app/views/admin/poll/questions/show.html.erb +++ b/app/views/admin/poll/questions/show.html.erb @@ -100,11 +100,3 @@ <% end %> - -<% if @question.video_url.present? %> -

- <%= t("admin.questions.show.video_url") %> -
- <%= @question.video_url %> -

-<% end %> diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index f51a3daf6..0f4ae62ee 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -1166,7 +1166,6 @@ en: edit_question: Edit question valid_answers: Valid answers add_answer: Add answer - video_url: External video answers: title: Answer description: Description diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 993c8594a..41848b570 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -1166,7 +1166,6 @@ es: edit_question: Editar pregunta valid_answers: Respuestas válidas add_answer: Añadir respuesta - video_url: Vídeo externo answers: title: Respuesta description: Descripción diff --git a/db/migrate/20250222222739_remove_poll_questions_video_url.rb b/db/migrate/20250222222739_remove_poll_questions_video_url.rb new file mode 100644 index 000000000..bf66fcff5 --- /dev/null +++ b/db/migrate/20250222222739_remove_poll_questions_video_url.rb @@ -0,0 +1,5 @@ +class RemovePollQuestionsVideoUrl < ActiveRecord::Migration[7.0] + def change + remove_column :poll_questions, :video_url, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index e3b541dc0..ab8291ece 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_10_26_112901) do +ActiveRecord::Schema[7.0].define(version: 2025_02_22_222739) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" enable_extension "plpgsql" @@ -1138,7 +1138,6 @@ ActiveRecord::Schema[7.0].define(version: 2024_10_26_112901) do t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.tsvector "tsv" - t.string "video_url" t.index ["author_id"], name: "index_poll_questions_on_author_id" t.index ["poll_id"], name: "index_poll_questions_on_poll_id" t.index ["proposal_id"], name: "index_poll_questions_on_proposal_id"