User tests: Successful: Unsuccessful:
This change adds the export of data to the MySQL(i) exporter. Since we want to prevent a backwards compatibility breach, no method interface has been added to JDatabaseExporter, something that should be done when moving to 4.0.
The code is not really suitable for large tables, since it would eat up memory till it fails. There is little that we can do to fix that.
I've put this together rather quickly, so there are no unittests yet. If there is general interest in this, I'll provide them later.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Libraries |
I'm interested but I agree - we need the opposite code in the importer and I think the default is probably always going to be off because of the large table issue. But it's definitely an option worth having
I've written an importer that should work for all databases. Again, this is very basic, but we should start somewhere.
For those intersted on testing this pr
i've made 2 cli script
https://github.com/alikon/joomla-platform-examples/blob/master/Joomla%2520CLI%2520App/cli/newExp.php
https://github.com/alikon/joomla-platform-examples/blob/master/Joomla%2520CLI%2520App/cli/newImp.php
before to run those CLI scripts you should apply #8615 with the fix for composite indexes see #8615 (comment)
then simply issue on your terminal the command php newExp.php
for exporting tables & data
after simply issue on your terminal the command php newImp.php
for importing tables & data
test that your staging site work as before
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-28 10:05:09 |
Closed_By | ⇒ | infograf768 |
Set to "closed" on behalf of @infograf768 by The JTracker Application at issues.joomla.org/joomla-cms/10991
Closed as we have a new PR going further: #14272
sound interesting
JFactory::getDbo()->getExporter()->from($table)->withData(true);
but we need one for the importer
something like
JFactory::getDbo()->getImporter()->from($table)->asXml()->mergeData();