Joomla-Bible-Study / Proclaim

Joomla Proclaim Component - Christian Web Ministries
https://www.christianwebministries.org/
GNU General Public License v3.0
11 stars 9 forks source link

How should update / migration work? How much test scenarios? #417

Closed st-anton closed 9 years ago

st-anton commented 9 years ago

I wanted to look for the postinstall, but I can't get the migration running. So tried some things, but failed again. Then I came to the question: What ways should there be to migrate an old database? I assume, the user want to set up a new Joomla system. (Are there other reasons to migrate as well?)

  1. Use old database backup, replace the #_ by the prefix, import this database by means of phpMyAdmin and run the installation of the latest version of the component.
  2. Install the old component (e.g. 8.0.0), import the database, uninstall the old component, install the latest version of the component.
  3. Install the old component (e.g. 8.0.0), import the database, install the latest latest version of the component (i.e. update the component).
  4. Install the latest version of the component, go to Administration -> Database functions -> Migrate -> select the old database by means of 'Import from a file' and submit.
  5. Same as 4. with putting in the filename under 'Import from server folder'.
  6. Use an old Joomla database, throw away all tables that are not *_bsms_*, import this database by means of phpMyAdmin, run the installation of the latest version of the component and go to Administration -> Database functions -> Migrate -> enter the prefix in Copy/Migrate Tables and submit.
  7. Install the latest version of the component, go to Administration -> Database functions -> Backup / Restore -> select the old database by means of 'Import database' and submit. 8 and 9. Doing 7. by means of 'Import Database from backup folder' or 'Import Database from tmp folder'.

I did test several of them, but were not able to migrate my 8.0.0 database.

bcordis commented 9 years ago

Please let me know what version of php you are using also.

there are three ways to do this. Install the component on top of existing older version. never have to uninstall old component. Have 9.0.0bata installed and use a backup version of JBSM in the migration tab.

The table migration is a little more tricky as you have to have the old db installed on the same database. then it should migrate the db. I have not tested this in a will and this was done by Tom

Hope this helps.

st-anton commented 9 years ago

I use php 5.4.7. What ist the minimum version? Are there other features / functionalities with newer versions?

bcordis commented 9 years ago

Minimum php is 5.3.11 as we fallow the Joomla standard. Let me if you are still getting error migrating. I'm pushing to stop leaving the tables on install as the system was never built for that.

st-anton commented 9 years ago

Tried to install BS 8.x.x on Joomla 3.3.6 and could not get running properly: BS 8.0.0 and BS 8.0.2: A table _bsms_search is missing; Bible Study Administration page cannot be displayed BS 8.0.8: First time call of Bible Study Administration page gives error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (access = '0' or access = '')' at line 3 SQL=UPDATE fmnj33_bsms_admin SET access = WHERE (access = '0' or access = '') but second time can be displayed. Nevertheless, database errors appear several times. ==> Migrating by installing an BS 8.x.x on a Joomla 3.x (and update with a BS 9.x) does not work as I would expect. This is due to incompatibilities (?) of the BS 8.x versions with Joomla 3.3.6. I think, we need to concentrate on

tomfuller2 commented 9 years ago

The paths that should work are:

Install 8.0.8 then install 9.0.0 on top Install 9.0.0 then reinstall 9.0.0

We're going to not do "migration" as such since we are only supporting Joomla 3.x from now on, but the db should upgrade, or ignore the upgrade to the db if it has already happened (that's stored in #__bsms_update I think).

So I think the migration tab goes away ...

On Fri, Jan 9, 2015 at 7:56 AM, st-anton notifications@github.com wrote:

Tried to install BS 8.x.x on Joomla 3.3.6 and could not get running properly: BS 8.0.0 and BS 8.0.2: A table _bsms_search is missing; Bible Study Administration page cannot be displayed BS 8.0.8: First time call of Bible Study Administration page gives error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (access = '0' or access = '')' at line 3 SQL=UPDATE fmnj33_bsms_admin SET access = WHERE (access = '0' or access = '') but second time can be displayed. Nevertheless, database errors appear several times. ==> Migrating by installing an BS 8.x.x on a Joomla 3.x (and update with a BS 9.x) does not work as I would expect. This is due to incompatibilities (?) of the BS 8.x versions with Joomla 3.3.6. I think, we need to concentrate on

  • (importing and) migration by migration tab and
  • installing the old db content in the same cb

— Reply to this email directly or view it on GitHub https://github.com/Joomla-Bible-Study/Joomla-Bible-Study/issues/417#issuecomment-69353300 .

st-anton commented 9 years ago

Do the BS 8.0.8 run properly on your Joomla 3.3.x? If yes: what is the difference to my installation? And: Should the Migration tab / button be removed in 9.0.0?

st-anton commented 9 years ago

Update by migration button crashes with memory allocation error. 128MByte are not enough for a database with 200 messages.

st-anton commented 9 years ago

You state: Install 8.0.8 then install 9.0.0 on top Install 9.0.0 then reinstall 9.0.0 ==> In my humble opinion, this means, that 9.0.0 only needs to migrate from the one and only version 8.0.8 to 9.0.0. No earlier version needs to be supported. ???

st-anton commented 9 years ago

Migrating my 8.0.0 backup into BS 8.0.8 crashes with: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE (access = '0' or access = '')' at line 3 SQL=UPDATE fmnj33_bsms_admin SET access = WHERE (access = '0' or access = '') INstalling a 9.0.0 afterwards crashes with: Fatal error: Class 'BibleStudyModelMigration' not found in ...\administrator\components\com_biblestudy\install\updates\9.0.0.php on line 312

bcordis commented 9 years ago

@tomfuller2 Should we stop supporting migration form 6.x DB's?

If now will can clean up a lot of code. Right now we support all the way back to 6.x backups.

bcordis commented 9 years ago

@st-anton have you tried migrating right into 9.0.0?

tomfuller2 commented 9 years ago

What I meant was we should support upgrading db's from 7.x and on. All 6 db's are from Joomla 1.5

On Friday, January 9, 2015, Brent Cordis notifications@github.com wrote:

@st-anton https://github.com/st-anton have you tried migrating right into 9.0.0?

— Reply to this email directly or view it on GitHub https://github.com/Joomla-Bible-Study/Joomla-Bible-Study/issues/417#issuecomment-69425180 .

bcordis commented 9 years ago

Ok so we need to drop migration of all 6.x and start at 7.x up.

So we are good to start removing code for the 6.x migrations. And place check to see if version is 7.x or grater.

tomfuller2 commented 9 years ago

Agreed

On Friday, January 9, 2015, Brent Cordis notifications@github.com wrote:

Ok so we need to drop migration of all 6.x and start at 7.x up.

So we are good to start removing code for the 6.x migrations. And place check to see if version is 7.x or grater.

— Reply to this email directly or view it on GitHub https://github.com/Joomla-Bible-Study/Joomla-Bible-Study/issues/417#issuecomment-69440798 .

st-anton commented 9 years ago

So we try to install 7.x and 8.x in Joomla 3.3, import the database and install 9.0.0 over this. My experience with 8.0.0 and 8.0.2 shows, that it cannot be run on a Joomla 3.3. so I expect severe problems on the users side. Dropping the Migration tab / button will disable them from migrate versions earlier than 8.0.8. I suggest to keep the migration tab / button, but deal with 7.x and 8.x database versions only.

tomfuller2 commented 9 years ago

I haven't tried to install anything below 8.08 on Joomla 3.3.

Sounds like your approach is sound Anton

On Saturday, January 10, 2015, st-anton notifications@github.com wrote:

So we try to install 7.x and 8.x in Joomla 3.3, import the database and install 9.0.0 over this. My experience with 8.0.0 and 8.0.2 shows, that it cannot be run on a Joomla 3.3. so I expect severe problems on the users side. Dropping the Migration tab / button will disable them from migrate versions earlier than 8.0.8. I suggest to keep the migration tab / button, but deal with 7.x and 8.x database versions only.

— Reply to this email directly or view it on GitHub https://github.com/Joomla-Bible-Study/Joomla-Bible-Study/issues/417#issuecomment-69464963 .

bcordis commented 9 years ago

We only support 8.0.8 on j3.3 as a migration point all other migrations they must backup there db from the old website and use the migration tool on j3.x

At most if they want to migrate there j2.5x website to j3.x they must install jbsm 8.0.8 then migrate to j3.3 then install 9.x.

Hope this clears this up.

st-anton commented 9 years ago

I read this again and again, I tried to install BS 8.0.8 on J 3.3.6 and migrate my old db (in my case: 8.0.0) but it failes; now I start to understand:

Is it like this? If not: can you please explain step by step, as there are so many ways of install / export / update mechanisms of both BS and J? If it is like this, the migration of old db completely is covered by BS 8.0.8. Pro: In the 9.0.0 we can kick out every migration step except 8.0.8 -> 9.0.0 Con: If anything goes wrong at the user, we have to support and maintain 8.0.8

And: the migration sequence need to be explained very carefully. Otherwise the user will be disappointed.

bcordis commented 9 years ago

Right now the best option is to not export the db at all.

options:

  1. install 8.0.8 on j2.5. Upgrade J2.5 to J3.x,. Install JBSM 9.x.
  2. backup db using JBSM backup. on fresh install of JBSM 9.x in j3.x migrate the backup file.
  3. Backup db using third party software replace prefix with "#_" and add "-- JBS Version x.x.x" to the head of the file.
  4. upload using to fresh install of j3.x and JBSM 9.x. using third party SQL software your old DB. Using the prefix under migration you migrate the old db to your new installation.

Right now I think that is all the options we have on the table.

@tomfuller2 can you verify this.