I am in the middle of upgrading from 3.18.2-3.18.3. After doing all the steps in the upgrade, including the database queries, I ran step_02.php, and I got the following errors:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42P16]: Invalid table definition: 7 ERROR: cannot change number of columns in view' in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc:878
Stack trace:
#0 /home/websites/mysource_matrix/core/lib/DAL/DAL.inc(878): PDO->exec('CREATE OR REPLA...')
#1 /home/websites/mysource_matrix/core/lib/db_install/db_install.inc(799): DAL::executeSql('CREATE OR REPLA...')
#2 /home/websites/mysource_matrix/install/step_02.php(118): install_stored_relations('views')
#3 {main}
thrown in /home/websites/mysource_matrix/core/lib/DAL/DAL.inc on line 878
I am assuming my upgrade is half complete, and something went wrong?
Hi Nic, report a bug for this and we'll take a look. I think you're the second person to see this particular problem with views, although I've never seen it on my own systems.
The only way to really fix it is to drop the views manually and let step_02.php recreate them. Although, this error appears to be non-destructive because it was not able to replace the view and didn't delete it., so your system should not be broken.
It would be great if the error showed the view name. You don't happen to see it anywhere do you (maybe in the PostgreSQL error logs)?
[quote]Hi Nic, report a bug for this and we'll take a look. I think you're the second person to see this particular problem with views, although I've never seen it on my own systems.
The only way to really fix it is to drop the views manually and let step_02.php recreate them. Although, this error appears to be non-destructive because it was not able to replace the view and didn't delete it., so your system should not be broken.
It would be great if the error showed the view name. You don't happen to see it anywhere do you (maybe in the PostgreSQL error logs)?[/quote]
Greg, I will submit a bug report.
This is the only line I see in the error log that has to do with views:
2008-07-08 07:09:32 UTC ERROR: cannot change number of columns in view
I continued the upgraded it everything seems to be ok.
I've just also come across this bug - similarly I continued the upgrade and it appears to have worked - however, the error still exists in 3.18.3 to 3.18.4 upgrade:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42P16]: Invalid table definition: 7 ERROR: cannot change number of columns in view' in /cege/www/mysource_matrix/core/lib/DAL/DAL.inc:878
Stack trace:
#0 /cege/www/mysource_matrix/core/lib/DAL/DAL.inc(878): PDO->exec('CREATE OR REPLA…')
#1 /cege/www/mysource_matrix/core/lib/db_install/db_install.inc(799): DAL::executeSql('CREATE OR REPLA…')
There is no error in Matrix itself. The error was in the upgrade procedure that listed the queries to run in the wrong order. The upgrade guide was fixed for users upgrading from 3.16 to 3.18. A 3.18.3 to 3.18.4 upgrade does not have any additional steps so you should not have been dropping any views. What guide did you follow?