SQLiteデータベースのバージョンの変換

sqliteのVer.2系とVer.3系がインストールされている場合以下のコマンドでデータベースファイルを変換できる。

sqlite dbfile .dump |sqlite3 new_dbfile

データベースがバージョンで読めるかは

pragma integrity_check;  => SQL error: file is encrypted or is not a database

このような結果が出ればバージョンが違います。