From 4000e6bcc63ba2db2799caa5e54cd398acb10ef5 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 10 Nov 2026 12:51:38 -0500 Subject: [PATCH] Drop contract_templates.company_id in database 3.6.3 where it exists: the 2.3.7 migration shipped in v25.11 creating it as INT NOT NULL with no default and was later changed to leave it out, so installs that updated on v25.11 kept a column nothing used, which the debug page listed as extra and which made adding a contract template fail in strict SQL mode; add the changelog entries and say in CONTRIBUTING why a shipped migration must not be edited --- CHANGELOG.md | 4 +++- CONTRIBUTING.md | 2 +- admin/database_updates/3.6.3.php | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 admin/database_updates/3.6.3.php diff --git a/CHANGELOG.md b/CHANGELOG.md index c265ccf77..76617f0e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,19 @@ This file documents all notable changes made to ITFlow. ### Upgrading -Update from Maintenance > Update — Queue Update hands the job to cron and it applies on its own. There is no database change in this release, so nothing else is required. From 26.11.3 or earlier, the same update also brings 26.11.4 and its database changes - see its notes below. Nobody needs to clear their browser's cache afterwards. +Update from Maintenance > Update — Queue Update hands the job to cron, which updates the files and applies this release's one database change (3.6.2 to 3.6.3) in the same pass. Nothing else is required. From 26.11.3 or earlier, the same update also brings 26.11.4 and its database changes - see its notes below. Nobody needs to clear their browser's cache afterwards. ### Bug Fixes - Updates: after an update, pages could act up - menus, buttons, editors and forms not working, or pages looking half old and half new - until each person cleared their browser's cache, and sometimes closed the browser and cleared it again. Browsers kept the copies of ITFlow's scripts and stylesheets from before the update and went on using them with the new pages, for days or weeks. Each one is now asked for by an address that changes when the file does, so after an update browsers fetch what changed straight away and keep using what didn't. This starts with this update: nobody needs to clear their cache for it. +- Contract Templates: on an install updated in 25.11, adding a contract template could fail with "Field 'company_id' doesn't have a default value", and Maintenance > Debug listed `contract_templates.company_id` as an extra column. 25.11's update gave the table a column nothing used, and no later update took it away. This update removes it. Installs set up or updated after 25.11 never had it. ### Developer Updates - `staticFileUrl($path)` in `functions/app.php` returns `$path?v=` and the file's `filemtime()`, or the path as it is when the file isn't there. Every `