Author Topic: DB Error when upgrading from 2.01 to 2.1  (Read 7747 times)

shodgman

  • Freshman
  • *
  • Posts: 27
    • View Profile
DB Error when upgrading from 2.01 to 2.1
« on: July 15, 2012, 04:19:08 am »
During the upgrade form 1.7.5 to 2.1 I have followed the migration page (could not post a link)
However, when upgrading from 2.0.1 to 2.1 I (we) get the following error:

Failed to execute DB schema transformations. MySQL said: Duplicate column name 'archived_by_id'
Error upgrading to version 2.1

This has also been recorded under "Installation"  but I am duplicating as it is a FengOffice 2 issue. (I was unable to post the link)

This effectively is preventing me (us) from updating from 1.7.5 to 2.1

Can somebody please help?
Thanks,
Steve H.

Blinkiz

  • Freshman
  • *
  • Posts: 24
    • View Profile
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #1 on: July 16, 2012, 03:31:34 am »
Same problem here.
It exist a bug ticket that everyone can post findings in.

Because of this forums stupid settings, I can not make it easy for you and post a link to the bug tracking system. It has ticket number 0003960.

shodgman

  • Freshman
  • *
  • Posts: 27
    • View Profile
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #2 on: July 16, 2012, 09:56:44 pm »
Thanks for letting me know.
Now we wait...  :)

mmartins

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #3 on: July 25, 2012, 02:40:14 pm »
Some problem here

jron

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #4 on: July 27, 2012, 02:16:18 pm »
Anyone get an answer on this? I have the same exact issue  :(

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #5 on: July 27, 2012, 07:38:41 pm »
Hello everyone,
We have found out what the issue is, and its solution, which will be published for next release, and then yes, NO MORE problems when upgrading from 1.7.5 to 2.X IF you follow the instructions of course. Eventually it will become more user friendly though :)

Here is the fix:
Change all of the content of the file at FENG_ROOT/public/upgrade/templates/db_migration/2_1_molleja.php for the following one:

Code: [Select]
-- <?php echo $table_prefix ?> fo_
-- <?php echo $default_charset ?> DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
-- <?php echo $default_collation ?> collate utf8_unicode_ci
-- <?php echo $engine ?> InnoDB

INSERT INTO `<?php echo $table_prefix ?>file_types` (`id` ,`extension` ,`icon` ,`is_searchable` ,`is_image`) VALUES
 ('34', 'odt', 'doc.png', '1', '0'), ('35', 'fodt', 'doc.png', '1', '0')
ON DUPLICATE KEY UPDATE id=id;
UPDATE `<?php echo $table_prefix ?>permission_groups` SET `type` = 'roles' WHERE `id` <= 13;
UPDATE `<?php echo $table_prefix ?>permission_groups` SET `type` = 'permission_groups' WHERE `contact_id` > 0;
UPDATE `<?php echo $table_prefix ?>permission_groups` SET `type` = 'user_groups' WHERE `type` = '' OR `type` IS NULL;


The difference here is that there no longer are ALTER statements, which were actually already ran in the first process so as to keep your archived items.

Once you make this change, go to your browser and then:
FENG_ROOT/public/upgrade
Select the 2.1 version and voilá!!

We are sorry for this issue, and we thank you for patience and comprehension.

Should anyone find any further problem, please let us know about it so that we can solve it for the 2.1.1 beta version.

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

jron

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #6 on: July 27, 2012, 10:12:02 pm »
Thanks! Worked like a charm

piter

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #7 on: July 31, 2012, 03:46:24 pm »
We've upgraded from 1.7.5 to 2.0.1 and from 2.0.1 to 2.1.0. Now at the bootom of each page I can see this text: "Powered by Feng Office 1.7.5". Strange :-/ We've got this line in version.php:
 return '1.7.5';
Does this mean that something went wrong during upgrade?

Edit: Directing my browser to http: //[feng_root]/public/upgrade shows me this:
You already have upgraded to the latest possible version: 2.1
So I don't understand why I have "1.7.5" on each page footer and in version.php file.
« Last Edit: August 01, 2012, 11:09:47 am by piter »

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #8 on: August 01, 2012, 03:55:32 pm »
Piter, did you follow these instructions?
http://www.fengoffice.com/web/wiki/doku.php/migration
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

shodgman

  • Freshman
  • *
  • Posts: 27
    • View Profile
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #9 on: August 01, 2012, 08:32:34 pm »
Well, I am now having problems going from 1.7.5 to 2.0.1
I am following the instructions in www <dot> fengoffice <dot> com/web/wiki/doku.php/migration
I have extracted fengoffice_2.1.0.zip into my folders as per the instructions.
I complete steps 1 through 6 fine

Question:  After step 7, upgrade to 2.0.1 should I do the plugin update?  If I do then the log shows errors looking for the PLUGINS path.
As per the migration instructions I did NOT copy the init.php into the root folder.  Question: Should I be copying the new files  into the root folder?

N.B. version.php is still 1.7.5 at this point

On step 8, the ~complete_migration.php step, I am finding zero records in the fo_processed_objects table.  Running the script again gets the same result.

So, I am completely confused as this part "Just Worked" previously.
Can anyone please shed some light on this?  I have tried all possible combinations that I can think of over the last 48 hours.  
Thanks,
---
Steve H

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #10 on: August 01, 2012, 08:41:36 pm »
No, the plugin update should be done in the end, not in step 7-8 running the following commands in this order:

php [FENG_ROOT]/public/install/plugin-console.php list
php [FENG_ROOT]/public/install/plugin-console.php update_all

Yes, you can copy the init.php file to the new folder.

What you mean is that you see nothing new after running the following command?
php FENG_ROOT/public/upgrade/complete_migration.php

That is pretty odd actually. Please bear in mind that depending on your server it will take some time. By some time it means from 15 minutes to 24 hours (if not more) depending on the amount of data you have and your servers power. Do not stop this process while it runs.. just watch a movie or do something else in between :)

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

shodgman

  • Freshman
  • *
  • Posts: 27
    • View Profile
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #11 on: August 02, 2012, 03:31:58 am »
Thanks for the clarification regarding the plugins.
I actually tried with and without the plugin update I believe.

What about the version.php still saying 1.7.5 AFTER the upgrade to 2.01 ??

To clarify:
php FENG_ROOT/public/upgrade/complete_migration.php  takes a number of minutes then the console prompt returns.  I then check the fo_processed_objects table and there are ZERO records.  That is my problem.

Can you please suggest where I might start looking for the solution?

 Alternatively, when will there be a proper release that does the upgrade itself?
Thanks for getting back to me,
---
SteveH

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #12 on: August 02, 2012, 09:54:25 am »
Truth be told I personally do not know why it does nothing when you run that complete_migration script. Whenever I run it when upgrading from 1.7.5 it does it job right.
Have you looked at your cache/log.php in case there is anything new there?
On the other hand, may be there is something odd in your database that prevents the upgrade to go on? Or may be it actually runs but for some reason records are not being created on fo_processed_objects table. Have you tried logging in to your system afterwards? Are you able to see all of the tasks, notes, documents ,etc.?

As to why the version.php still says 1.7.5 I am not sure.. it should not if you delete the old version.php file and overwrite it with the new one which says 'return 2.1;' right? Are you deleting the other folders as suggested in the Wiki?

Last but not least, next release has already been improved and you will not have to go to 2.0.1 before 2.1 for the major upgrade. This was not supposed to work this way, but due to a bug that was left - among several others as you have noticed - there was no other way than this until the bug got fixed.. which it did now.. so to sum up, next version will allow going from 1.7.5 to next version. However, we are still working on how to improve the 'complete_migration' process as for people with a lot of data and not powerful servers this may lead to timeouts considering the fact it may take many hours, so for the time being it has to be run through the console..
Should anyone happen to help us improving this very process, please feel free to drop me a PM or an email.

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #13 on: August 02, 2012, 11:33:59 am »
Another thing to take into account: please count the amount of records in the sharing table and the searchable objects one and let me know the amounts.

Greetings!
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

shodgman

  • Freshman
  • *
  • Posts: 27
    • View Profile
Re: DB Error when upgrading from 2.01 to 2.1
« Reply #14 on: August 03, 2012, 03:33:56 am »
Before conversion
og_shared_objects has zero records
og_searchable_objects has 1704 records


BTW, I have been checking cache/log.php whenever I did the conversion.  complete_migration is not adding anything.

Thanks
--
SteveH