Changes between Version 1 and Version 2 of SqLiteToMySql
- Timestamp:
- Jan 2, 2007, 11:59:48 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SqLiteToMySql
v1 v2 14 14 3. Use sqlite .dump to dump the structure + data from sqlite into trac.sqlite.sql (unfortunately there's no option to only dump the data). 15 15 4. Remove all the structure ('create table' and 'create index') from trac.sqlite.sql 16 5. Concatenate trac.mysql.sql and trac.sqlite.sql into trac.sql 16 You could use this simple perl script: 17 {{{ 18 $ cat cleansql 19 #!/usr/bin/env perl 17 20 21 while (<>) { 22 $i = $i . $_; 23 } 24 25 $i =~ s/^CREATE.*?\);$//smgi; 26 27 print $i; 28 29 # NEOF 30 31 $ ./cleansql trac.sqlite.sql > trac.sqlite.sql.dataonly 32 }}} 33 5. Concatenate trac.mysql.sql and trac.sqlite.sql.dataonly into trac.sql 34 {{{ 35 cat trac.mysql.sql trac.sqlite.sql.dataonly > trac.sql 36 }}}