Page 1 of 1

No Tables listed for Fast Reports after NB update

Posted: Sun Jan 21, 2018 6:38 am
by mikep345678
I'd just uploaded the newest git pull to my nb folder, changed the nuconfig.php file, then logged in to my nb instance and hit the update button.

I then saw that there were not longer any tables listed in the Fast Report table lookup.

Figuring I'd screwed something up, I nuked my whole mysql database and restored from the export I'd done prior to updating. Re-ran the update button, but same problem: no Tables were listed as available as sources for Fast Reports.

A peek at nuDebug indicated the problem: the zzzzsys_report_data table was missing.

This is the same table that throws up errors on initial nuBuilder setup because the nubuilder4.sql file calls for the table to be created with "root" credentials. I'd changed "root" to my database username to get around the errors on initial setup-- but apparently the update button couldn't do its magic on that table because of the security specification.

I resolved my "no Tables listed for Fast Reports" by running the following code (extracted and modified from nubuilder4.sql) to recreate the missing zzzzsys_report_data and zzzzsys_run_list tables. Logging back into my nuBuilder instance, the table lookup was populated...

Steve, could you please clarify the necessity of the security parameters in nubuilder4.sql? I know others have asked about the error during installation.

Since the report_data table appears to have been automatically repopulated after it was recreated, perhaps this code should be part of nuupdate?

(Also-- procedures I'd added before have disappeared-- Apparently they weren't backed up? Does a git update nuke procedures?)


Thank you!
Mike

Code: Select all

-- --------------------------------------------------------

--
-- Stand-in structure for view `zzzzsys_report_data`
-- (See below for the actual view)
--
CREATE TABLE `zzzzsys_report_data` (
`id` varchar(306)
,`code` varchar(300)
,`description` varchar(300)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `zzzzsys_run_list`
-- (See below for the actual view)
--
CREATE TABLE `zzzzsys_run_list` (
`id` varchar(25)
,`run` varchar(9)
,`code` varchar(300)
,`description` varchar(300)
);


-- Structure for view `zzzzsys_report_data`
--
DROP TABLE IF EXISTS `zzzzsys_report_data`;

CREATE VIEW `zzzzsys_report_data`  AS  select concat('PROCEDURE:',`zzzzsys_php`.`zzzzsys_php_id`) AS `id`,`zzzzsys_php`.`sph_code` AS `code`,`zzzzsys_php`.`sph_description` AS `description` from `zzzzsys_php` where ((`zzzzsys_php`.`sph_system` <> '1') and (locate('#TABLE_ID#',`zzzzsys_php`.`sph_php`) > '0')) union select concat('SQL:',`zzzzsys_select`.`zzzzsys_select_id`) AS `id`,'nuSQL' AS `code`,`zzzzsys_select`.`sse_description` AS `description` from `zzzzsys_select` where (`zzzzsys_select`.`sse_system` <> '1') union select concat('TABLE:',`zzzzsys_table`.`zzzzsys_table_id`) AS `id`,'nuTABLE' AS `code`,`zzzzsys_table`.`zzzzsys_table_id` AS `description` from `zzzzsys_table` ;

-- --------------------------------------------------------

--
-- Structure for view `zzzzsys_run_list`
--
DROP TABLE IF EXISTS `zzzzsys_run_list`;

CREATE VIEW `zzzzsys_run_list`  AS  select `zzzzsys_form`.`zzzzsys_form_id` AS `id`,'Form' AS `run`,`zzzzsys_form`.`sfo_code` AS `code`,`zzzzsys_form`.`sfo_description` AS `description` from `zzzzsys_form` union select `zzzzsys_report`.`zzzzsys_report_id` AS `id`,'Report' AS `run`,`zzzzsys_report`.`sre_code` AS `code`,`zzzzsys_report`.`sre_description` AS `description` from `zzzzsys_report` union select `zzzzsys_php`.`zzzzsys_php_id` AS `id`,'Procedure' AS `run`,`zzzzsys_php`.`sph_code` AS `code`,`zzzzsys_php`.`sph_description` AS `description` from `zzzzsys_php` where (`zzzzsys_php`.`sph_system` <> 1) order by `code` ;


Re: No Tables listed for Fast Reports after NB update

Posted: Sun Jan 21, 2018 7:44 am
by toms
Hi,

This issue has been discussed in other threads.
http://forums.nubuilder.cloud/viewtopic.p ... =algorithm

@Steven: Maybe the update procedure could remove this ALGORITHM...DEFINER string?

Re: No Tables listed for Fast Reports after NB update

Posted: Sun Jan 21, 2018 3:18 pm
by mikep345678
Toms,

Yes, I'd made reference to others having asked about it. I was reporting an effect of having left in the "algorithm" parameter, and the work-around, and hoping we can figure out permanent clarification!


Mike

Re: No Tables listed for Fast Reports after NB update

Posted: Mon Jan 22, 2018 2:58 am
by admin
Guys,

Have you tried on another host?

Steven

Re: No Tables listed for Fast Reports after NB update

Posted: Mon Jan 22, 2018 4:08 am
by admin
Attached is a copy of nubuilder4.sql built from mysqldump.

Replace that and see if it will work for you.
nubuilder4.zip
Please let me know.

Steven