This is a comment on Cannot refer to uploaded files, posted by coffe1nk at 04.05.2022 17:33
View source for Re: Cannot refer to uploaded files
Thank You WikiAdmin, I have tried %%const SQL_MODE_STRICT = 'TRADITIONAL,NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY'; const SQL_MODE_PERMISSIVE = 'NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER'; //these two parameters are default value%% and config.php already set to %%'sql_mode_strict' => '0',%% change back %%ALTER TABLE wacko_file MODIFY caption text NOT NULL;%% The result is : %%INSERT INTO wacko_file SET page_id = 18, user_id = 3,file_name = '16487410983501.jpg', file_lang = 'en', file_description = '', file_size = 46871,picture_w = 800,picture_h = 800,file_ext = 'jpg',mime_type = 'image/jpeg',uploaded_dt = '2022-05-04 15:44:13',modified_dt = UTC_TIMESTAMP() [0.0002 sec., -1 rows]%% ---- ##wacko/setup/database_mysql.php## %%$tbl_file = "CREATE TABLE {$pref}file ( file_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, page_id INT(10) UNSIGNED NOT NULL DEFAULT '0', user_id INT(10) UNSIGNED NOT NULL DEFAULT '0', file_name VARCHAR(255) NOT NULL DEFAULT '', file_lang VARCHAR(5) NOT NULL DEFAULT '', file_description VARCHAR(255) NOT NULL DEFAULT '', -- caption TEXT NOT NULL, <<=== change to: caption TEXT, author VARCHAR(255) NOT NULL DEFAULT '', source VARCHAR(255) NOT NULL DEFAULT '', source_url VARCHAR(255) NOT NULL DEFAULT '', license_id INT(10) UNSIGNED NOT NULL DEFAULT '0', uploaded_dt DATETIME NULL DEFAULT NULL, modified_dt DATETIME NULL DEFAULT NULL, file_size INT(10) UNSIGNED NOT NULL DEFAULT '0', picture_w INT(10) UNSIGNED NOT NULL DEFAULT '0', picture_h INT(10) UNSIGNED NOT NULL DEFAULT '0', file_ext VARCHAR(10) NOT NULL DEFAULT '', mime_type VARCHAR(255) NOT NULL DEFAULT '', deleted TINYINT(1) UNSIGNED NULL DEFAULT '0', PRIMARY KEY (file_id), UNIQUE idx_page_id (page_id, file_name), KEY idx_page_id_2 (page_id, uploaded_dt), KEY idx_deleted (deleted), KEY idx_user_id (user_id) ) {$engine} COMMENT='' {$charset} {$collation}";%%