File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -913,9 +913,14 @@ bool DBBrowserDB::dump(const QString& filePath,
913913 else {
914914 QString statement = QString::fromStdString (it->originalSql ());
915915 if (keepOldSchema) {
916- // The statement is guaranteed by SQLite to start with "CREATE TABLE"
917- const int createTableLength = 12 ;
918- statement.replace (0 , createTableLength, " CREATE TABLE IF NOT EXISTS" );
916+ if (statement.startsWith (" CREATE VIRTUAL TABLE" , Qt::CaseInsensitive)) {
917+ const int createTableLength = 20 ;
918+ statement.replace (0 , createTableLength, " CREATE VIRTUAL TABLE IF NOT EXISTS" );
919+ } else {
920+ // The statement is guaranteed by SQLite to start with "CREATE TABLE"
921+ const int createTableLength = 12 ;
922+ statement.replace (0 , createTableLength, " CREATE TABLE IF NOT EXISTS" );
923+ }
919924 }
920925 stream << statement << " ;\n " ;
921926 }
You can’t perform that action at this time.
0 commit comments