Get started with PHP-Fusion

  1. PHP-Fusion Support Forums
  2. PHP-Fusion 7 Support
  3. Upgrading issues

Data migration 6.01.16=>7.02.05, no upgrade

Please limit yourself to upgrading issues, not installation.

0 Reply 1,283 Views Last Updated on 2 years ago

clone9cz


Newbie

#1

Posted 2 years ago

Hello everyone running on 6.01.16
I was decided to upgrade my fusion 6 to 7 on background.
You are reading my scenario now, enjoy it.

Scenario: identify every column and transform it into new data structure of v7.02.05.
Benefits: clean instalation, no errors at upgrade, easy transcoding outside db (codepage, old urls, bad words)


necessary tools
PSPad (regexp compatible tool) on Win7 (gnuwin32 sed.exe may destroy codepage)

Step 1
Install new Fusion 7
Step 2
Export all the Fusion 7 tables in to the separate file with options "extended inserts", "add drop table", MYSQL40 compatibility
Step 3
Export all tge Fusion 6 tables in to the separate file with option "extended inserts", "add drop table", MYSQL40 compatibility
Step 4
open Fusion 6 dump and move all INSERTs into the 7 dump immediately behind semicolon of CREATE TABLE command (strongly recomended: don't touch the first line of user INSERT)
Step 5
run all REGEXP transformation on each file, save modified dumps as new files
Step 6
import modified dumps into the Fusion 7
Step 7
use lostpassword.php


Same table structure (same INSERTs)
articles_cat
weblink
weblink_cat
messages
news_cats
faqs
faq_cats
custom_pages

required transformation
articles
user
threads
posts
forums
news

bypassed
poll
panels
and others tables


table articles
Code Gist: Download source  
find
\\''
replace
"
regexp
^\(([0-9]*), ([0-9]*), '([^']*)', '([^']*)', '([^']*)', '([^']*)', ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*)\)([,;]{1})$
TRANSFORM
($1, $2, '$3', '$4', '$5', 0, '$6', $7, $8, $9, $10, $11)$12


table forums
Code Gist: Download source  
regexp
\(([0-9]*), ([0-9]*), '([^']*)', ([0-9]*), '([^']*)', '([0-9.]*)', ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*)\)([,;]{1})$
TRANSFORM
($1, $2, '$3', $4, '$5', '', $7, $8, 101, 0, 0, 0, 0, $9, '', '', $10, 0)$11


table news
Code Gist: Download source  
find
\\''
replace
"
regexp
^\(([0-9]*), '([^']*)', ([0-9]*), '([^']*)', '([^']*)', '([^']*)', ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*)\)([,;]{1})$
TRANSFORM
($1, '$2', '', '', '', $3, '$4', '$5', '$6', $7, $8, $9, $10, $11, $12, 0, $13, $14, $15)$16


table posts
Code Gist: Download source  
REGEXP
^\(([0-9]*), ([0-9]*), ([0-9]*), '([^']*)', '([^']*)', ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), '([^']*)', ([0-9]*), ([0-9]*)\)([,;]{1})$
TRANSFORM
($1, $2, $3, '$5', $6, $7, $8, $9, '$10', 4, $11, $12, '', 0, 0)$13


REGEXP
\[color=[a-z]*\]
TRANSFORMACE
[i]
REGEXP
\[/color\]
TRANSFORMACE
[/i]


table threads
Code Gist: Download source  
regexp
^\(([0-9]*), ([0-9]*), '([^']*)', ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*)\)([,;]{1})$
TRANSFORM
($1, $2, '$3', $4, $5, $6, 1, $7, 1, 0, $8, $9, 0)$10


table users (do not touch the first line)
Code Gist: Download source  
REGEXP PWD default PWD
^\(([0-9]*), '([^']*)', '([^']*)', '([^']*)', ([0-9]*), '([^']*)', '([^']*)', '([^']*)', '([^']*)', '([^']*)', '([^']*)', '([^']*)', '([^']*)', '([^']*)', '([^']*)', '([^']*)', ([0-9]*), ([0-9]*), ([0-9]*), '([^']*)', '([^']*)', '([^']*)', ([0-9]*), ([0-9])\)([,;]+)$
TRANSFORM
($1, '$2', 'sha256', 'e369f99abd60c9edf7394baa48999f2f7ccb16ca', 'aa00aa11aa22aa33aa44aa55aa66aa77aa88aa99aa00aa11aa22aa33aa44aa55', 'sha256', '', '', '$4', $5, '0', '', $17, '', $18, $19, '', 4, '', '$22', 101, 0, 0, 'Default', '$6', '$7', '', '', '', '', '', '$12', '')$25



ERRORs
import error may be caused by shorter forum_name of the v7.02.05
`forum_name` varchar(50) NOT NULL DEFAULT '',
my old Fusin 6 used
`forum_name` varchar(100) NOT NULL default '',

Posts: 6

Joined: 28/11/2008

Jump to Forum:
17 users are online
0 member and 17 guests