e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

[Bug]: problem with adding new table via plugin sql table #5244

Open Jimmi08 opened 1 month ago

Jimmi08 commented 1 month ago

What e107 version are you using?

Latest Github version (just updated)

Bug description

Maybe this worked this way before

I have plugin, I need to add new table. I added it to SQL file:

CREATE TABLE `race_result` (
`race_result_id` int(10) NOT NULL AUTO_INCREMENT,
`race_result_racer_id` varchar(100) NOT NULL,
`race_result_racer_number` VARCHAR(11) NOT NULL,
`race_result_time` varchar(255) NOT NULL,
`race_result_sent` INT(10) NOT NULL,
`race_result_log` LONGTEXT NOT NULL,
`race_result_created` INT(10) NOT NULL,
`race_result_updated` INT(10) NOT NULL,
PRIMARY KEY (`race_result_id`)
) ENGINE=InnoDB;

e107_update detects this correctly but after the update action:

Update Unsuccessful [CREATE TABLEe107_race_result() ENGINE=InnoDB DEFAULT CHARACTER SET=utf8mb4;]

Notice missing fields.

Tools/Database check and run fix from there solved this, but there is little issue with not refreshing after running fix and it looks like not working, only if you run it again, you will get message that table already exists.

How to reproduce

No idea, use that code?

Expected behavior

Added table to database in e107 update functionality

What browser(s) are you seeing the problem on?

Firefox, Chrome / Brave

PHP Version

PHP 7.4