? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
1 Jul 2016

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.

avatar Hackwar Hackwar - open - 1 Jul 2016
avatar Hackwar Hackwar - change - 1 Jul 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jul 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 2 Jul 2016
Category Libraries
avatar alikon
alikon - comment - 2 Jul 2016

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();

avatar wilsonge
wilsonge - comment - 3 Jul 2016

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

avatar Hackwar
Hackwar - comment - 4 Jul 2016

I've written an importer that should work for all databases. Again, this is very basic, but we should start somewhere.

avatar alikon
alikon - comment - 26 Sep 2016

For those intersted on testing this pr
i've made 2 cli script

  • one for exporting all tables and data from a current staging joomla install

https://github.com/alikon/joomla-platform-examples/blob/master/Joomla%2520CLI%2520App/cli/newExp.php

  • one for import all tables and data from the prevoius export

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

avatar infograf768 infograf768 - change - 28 Mar 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-03-28 10:05:09
Closed_By infograf768
avatar joomla-cms-bot joomla-cms-bot - edited - 28 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - close - 28 Mar 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 28 Mar 2017
avatar infograf768
infograf768 - comment - 28 Mar 2017

Closed as we have a new PR going further: #14272


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/10991.

Add a Comment

Login with GitHub to post a comment