
Newbie

Posts: 6
Joined: 28/11/2008
|
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
Codefind
\\''
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
Coderegexp
\(([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
Codefind
\\''
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
CodeREGEXP
^\(([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
Coderegexp
^\(([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)
CodeREGEXP 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 '',
www.vwings.net
|