Author Topic: Migration script for 2.0 beta-x to 2.0 stable (2.0.0.8)  (Read 2631 times)

alx

  • Freshman
  • *
  • Posts: 10
    • View Profile
Migration script for 2.0 beta-x to 2.0 stable (2.0.0.8)
« on: July 26, 2012, 02:58:49 pm »
Hi all!

I see that there is a migration script for 1.7.5 to 2.0.0.8 (aka 2.0 stable), but I don't seem to have any luck with the upgrade from 2.0 beta-3 (aka 2.0.0.6) to either 2.0 beta-4 (aka 2.0.0.7) or higher (I did a test upgrade from 2.0.0.8 to 2.1.0 and it was absolutely fine).

Is there a chance of a migration script from 2.0 beta-3 to a higher version to be constructed in the future, or should I install 2.1.0 and enter my data from scratch?

Many thanks!

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Migration script for 2.0 beta-x to 2.0 stable (2.0.0.8)
« Reply #1 on: August 01, 2012, 08:15:28 pm »
I suggest you starting from zero with this manual: http://www.fengoffice.com/web/wiki/doku.php/migration

Then look at my last post here: http://forums.fengoffice.com/index.php?topic=15272.0

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

alx

  • Freshman
  • *
  • Posts: 10
    • View Profile
Re: Migration script for 2.0 beta-x to 2.0 stable (2.0.0.8)
« Reply #2 on: August 02, 2012, 08:48:20 am »
Thanks for your reply Francisco!

I had quite an extensive look at both the guides on the wiki and previous posts before posting my question (perhaps I should have mentioned it). The error I was getting was:

Code: [Select]
Failed to execute DB schema transformations. MySQL said: Table 'fo_administration_tools' already exists
I followed your suggestion, but without any luck. The same error occurs. By the way, your suggestion in that post was for the 2_1_molleja.php script. After I had a look at the source, it seems to be used for upgrading from a 2.x stable (e.g. 2.0.0.8 ) to 2.1.0, but not from a 2.x beta to 2.1.0 (which is my case).

The problem seems to originate from:
FENG_ROOT/public/install/installation/templates/sql/mysql_schema.php

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
-- varchar cannot be larger than 256
-- blob/text cannot have default values
-- sql queries must finish with ;\n (line break inmediately after ;)

CREATE TABLE `<?php echo $table_prefix ?>administration_tools` (

I can think of two workarounds:
a) Change the table prefix in this file to something else.
b) Change the "CREATE TABLE" commands into "CREATE TABLE IF NOT EXISTS".
But will this successfully migrate the existing data?

By the way, there are a few instances of "CREATE TABLE IF NOT EXISTS" commands in mysql_schema.php.

Thank you in advance,
Alex