From b4f850e97aeb12369399d8e1ab354f66d3b88e40 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 27 Jun 2026 02:39:55 +0200 Subject: Stage 6 click-testing fixes and production setup - file_attachment.rb: delete old upload directory before writing replacement files; fixes orphaned variants when filename or mime type changes - assets/edit.html.erb: add file upload field and current file display; the form was previously empty and non-functional - admin.css: fix button_to hover styling; buttons now show orange hover to signal interactivity - test/controllers/users_controller_test.rb: assert input[type=submit] not anchor tag for destroy action (button_to change) - test/test_helper.rb: add I18n.locale reset in setup block - doc/rc.d_cccms: fix cccms_chdir, add start_precmd for log/pid dirs, PATH export for bash wrapper, user/pid/tcp_nopush unicorn fixes - doc/INSTALL.md: new installation guide covering all non-obvious steps - Remove parked search migration from doc/ (now in db/migrate/) --- ...d_search_vector_to_page_translations.rb.pending | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 doc/20260626025705_add_search_vector_to_page_translations.rb.pending (limited to 'doc/20260626025705_add_search_vector_to_page_translations.rb.pending') diff --git a/doc/20260626025705_add_search_vector_to_page_translations.rb.pending b/doc/20260626025705_add_search_vector_to_page_translations.rb.pending deleted file mode 100644 index 0747637f..00000000 --- a/doc/20260626025705_add_search_vector_to_page_translations.rb.pending +++ /dev/null @@ -1,47 +0,0 @@ -class AddSearchVectorToPageTranslations < ActiveRecord::Migration[7.2] - def up - add_column :page_translations, :search_vector, :tsvector - - execute <<~SQL - UPDATE page_translations - SET search_vector = to_tsvector( - 'simple', - coalesce(title, '') || ' ' || - coalesce(abstract, '') || ' ' || - coalesce(body, '') - ) - SQL - - add_index :page_translations, :search_vector, - using: :gin, - name: 'index_page_translations_on_search_vector' - - execute <<~SQL - CREATE OR REPLACE FUNCTION page_translations_search_vector_update() - RETURNS trigger AS $$ - BEGIN - NEW.search_vector := to_tsvector( - 'simple', - coalesce(NEW.title, '') || ' ' || - coalesce(NEW.abstract, '') || ' ' || - coalesce(NEW.body, '') - ); - RETURN NEW; - END; - $$ LANGUAGE plpgsql; - - CREATE TRIGGER page_translations_search_vector_trigger - BEFORE INSERT OR UPDATE ON page_translations - FOR EACH ROW EXECUTE PROCEDURE page_translations_search_vector_update(); - SQL - end - - def down - execute <<~SQL - DROP TRIGGER IF EXISTS page_translations_search_vector_trigger ON page_translations; - DROP FUNCTION IF EXISTS page_translations_search_vector_update(); - SQL - remove_index :page_translations, name: 'index_page_translations_on_search_vector' - remove_column :page_translations, :search_vector - end -end -- cgit v1.3