User tests: Successful: Unsuccessful:
Currently Database Schema checker (Database FIX) button is ignoring
e.g. this is not checked
ALTER TABLE `table1` MODIFY `colname1` NOT NULL DEFAULT 'somevalue'
Also this is applied only when column is of wrong name
ALTER TABLE `table1` CHANGE `colname_old` `colname_new` NOT NULL DEFAULT 'somevalue'
Thus the above query will not run if column is correct name despite NULL and DEFAULT attributes being of wrong value
Modify Schema checker to support checking the above
(modified and tested Mysql / Maria DB, someone should help with the other DBs)
View an 'upgrade' SQL file that has
ALTER TABLE 'table1' MODIFY/CHANGE ...
e.g.
administrator/components/com_admin/sql/updates/mysql/3.7.0-2016-11-04
ALTER TABLE `#__extensions` CHANGE `enabled` `enabled` TINYINT(3) NOT NULL DEFAULT '0';
-- Go to a DB manager e.g. phpmyadmin and change it to NULL
Run the DB Fixer and you will be ask to fix it (back to NOT NULL)
-- Go to a DB manager e.g. phpmyadmin and change DEFAULT to '1'
Run the DB Fixer and you will be ask to fix it (back to '0')
If your apply this PR to some older installations e.g. a J2.5 upgraded up to staging,
then probably you will find several errors ... already being there
Database Schema checker (Database FIX) supports checking
queries like: ALTER TABLE 'table1' MODIFY/CHANGE
The above are not checked
None
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | Libraries | ⇒ | Administration Language & Strings Libraries |
This needs doing for the mssql and postgresql drivers too. we need parity between the drivers
Yes indeed , and i have asked for someone to volunteer to convert code to the other DBs
it will take me some time to setup again these environments, but if i get some time i will do it
Labels |
Added:
?
|
Status | Pending | ⇒ | Information Required |
@ggppdk do i guess correct there is no Progress on this issue?
yes, this code is still implemented for only MySQL, don't have time to test / implement for other DBs now, this will need to wait for a while longer
i'll look at it
after some dirty hacks for solving conflicts, and as per testing info
under mysql driver it works as described....
i'll try to port these changes to the postgresql driver too...
Thanks :)
Rebased the PR,
the file had no other changes, it was simply moved to new location
I have tested this item
Status | Information Required | ⇒ | Discussion |
I have tested this item
Status | Discussion | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-26 03:23:44 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
This needs doing for the mssql and postgresql drivers too. we need parity between the drivers