Fix database (MySQL) importer / exporter#191
Fix database (MySQL) importer / exporter#191mbabker merged 9 commits intojoomla-framework:2.0-devfrom
Conversation
|
Travis fails with PHP 7.4:
https://travis-ci.org/joomla-framework/database/jobs/583842640 |
Yup, well aware. The entire package test suite needs to be rewritten to not rely on the deprecated DbUnit extension for PHPUnit, which blocks upgrading to a PHPUnit version that does not emit these deprecation notices. |
|
The change to postgres is wrong. See #180 (tl/dr: calling reset in jtable resets the values with the default values from the table instance) - so historically here the default property here is just the table default with none of the bonus information. |
|
When you install a fresh nightly build, the default value is: "the bonus information" is just a cast. |
|
Example of Dump with phpPgAdmin:
|
|
ping @alikon , @richard67 |
@twister65 Do you mean with "dump" a database export done by phpPgAdmin? If so, then this is maybe not exactly the same as the SQL statement used by the driver here: database/src/Pgsql/PgsqlDriver.php Line 211 in 132bb1b |
|
It contains the "bonus information" stuff, but it was filtered after: database/src/Pgsql/PgsqlDriver.php Lines 257 to 260 in c5cd726 |
|
I see. Well I'd prefer not to change that, it worked before, and who knows if this "bonus information" is there or not depends on seome server setting which might be different here and there? Regarding the other changes: How shall there be tested? Was there any PHP notice before correction? Regarding consistent code style: I see you use in your changes in PHP files sometimes "NULL" and sometimes "null" for value null. Is that by purpose? |
|
And on MySQL? |
|
@twister65 I've just tested with PosgreSQL (PDO) on current 4.0-dev but still have these warnings shown in Extensions -> Manage -> Database. The "Fix" button then can fix them. |
|
@richard67 , you have to apply this patch manually in your |
|
That's what I've done. |
|
Let's wait and see if @alikon can test. Maybe I made some mistake. And I have other priorities for the coming week and weekend. So it may take a while until I can continue with this PR here. |
|
The problem here is that Also see https://github.com/joomla/joomla-cms/pull/6314/files#diff-cee5c179fc86adf6c499ee4641ae4780R396 for similar "Fixes" to postgresql that are likely going to cause descrepancies because |
|
Clearly, what would you like to solve this problem with postgresql ? Do you want I rollback the postgreSQL commit ? Have you seen your postgreSQL tables after a new installation ? All default values have a cast (except integer values). I'm still waiting for @alikon review and test. |
|
@twister65 Yes, the tables have a cast after installation when exporting them with postgresql tools, but that cast is not necessary for anything to work, and it confuses our database checker and other things at other places, so yes, I would suggest you remove it. |
Normalise default values like timestamp (Pgsql).
|
sorry folks for my unresponsiveness....it went out of my radar |
Staging ??? It works with 4.0-dev (beta1-dev). @alikon , the database library for staging is here: |
|
yes i mean 4.0-dev (beta1-dev) cloned from github |
|
@alikon, non riesco a riprodurre questo errore con i dati di esempio beta1. |
|
i've tested without any sample data just a fresh install |
|
my last report #191 (comment) it is wrong |
|
Can you sync your branch with the current |
|
RTC, please. |
|
I wish I could, but I'm not a maintainer of this repo nor have other privileges on it ;-) |




Fix bugs with database (MySQL) exporter / importer.
Summary of Changes
fix null integer insertion.
fix search for current_timestamp.
Testing Instructions
Go to the cli folder of your website.
Export all tables and data to the folder:
php joomla.php database:export --all --folder <folder_path>Import all from folder:
php joomla.php database:import --all --folder <folder_path>Or