From 97502808cfb1328556ff420d1c23a7b72526b607 Mon Sep 17 00:00:00 2001 From: John Hsu Date: Fri, 7 Feb 2025 02:05:32 -0800 Subject: [PATCH] FIX missing cake_sessions table on new install The cake_sessions table is used by the worker, on a fresh install, the worker will crash due to it missing. I've added it to the database create sql to fix this. Originally, it was meant to be created by app/config/bootstrap.php as a sign of successful install, but the worker gets up and running before that gets to run. Fix a '>' appearing at the top of the page if no Google analytics is confirmed. This is an extra > in the Google analytics script block. DJJob was still being pulled in by git submodule, looking at the submodules, we don't use most of it anymore, so I added a manual clone to the Dockerfile to pull it in. --- Dockerfile | 1 + app/config/sql/ipeer.sql | 8 ++++++++ app/config/sql/ipeer_samples_data.sql | 8 +++++++- app/views/layouts/default.ctp | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index baf6efa0..f854bccd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ COPY . /var/www/html COPY docker/docker-entrypoint-php-fpm.sh / RUN cd /var/www/html \ + && git clone https://github.com/seatgeek/djjob.git app/plugins/djjob/vendors \ && composer install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --optimize-autoloader \ && mkdir -p /var/www/html/app/tmp/cache/persistent /var/www/html/app/tmp/cache/models /var/www/html/app/tmp/logs \ && chown www-data:www-data -R /var/www/html/app/tmp/cache \ diff --git a/app/config/sql/ipeer.sql b/app/config/sql/ipeer.sql index c830eece..9c945a7e 100644 --- a/app/config/sql/ipeer.sql +++ b/app/config/sql/ipeer.sql @@ -1635,3 +1635,11 @@ CREATE TABLE IF NOT EXISTS `jobs` ( ) ENGINE = InnoDB DEFAULT CHARSET=utf8; SET foreign_key_checks = 1; + +-- -------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS `cake_sessions` ( + `id` varchar(255) NOT NULL, + `data` text DEFAULT NULL, + `expires` int(11) DEFAULT NULL, PRIMARY KEY (`id`) +); diff --git a/app/config/sql/ipeer_samples_data.sql b/app/config/sql/ipeer_samples_data.sql index b996080f..f3318888 100644 --- a/app/config/sql/ipeer_samples_data.sql +++ b/app/config/sql/ipeer_samples_data.sql @@ -2394,4 +2394,10 @@ CREATE TABLE IF NOT EXISTS `jobs` ( -- store course term ALTER TABLE `courses` ADD COLUMN `term` VARCHAR(50) NULL DEFAULT NULL; ---- END: Added by DB upgrade to version 17 +-- END: Added by DB upgrade to version 17 + +CREATE TABLE IF NOT EXISTS `cake_sessions` ( + `id` varchar(255) NOT NULL, + `data` text DEFAULT NULL, + `expires` int(11) DEFAULT NULL, PRIMARY KEY (`id`) +); diff --git a/app/views/layouts/default.ctp b/app/views/layouts/default.ctp index 09e30990..2ff1102b 100644 --- a/app/views/layouts/default.ctp +++ b/app/views/layouts/default.ctp @@ -51,7 +51,7 @@ gtag('js', new Date()); gtag('config', ''); - > +