Revision #3 has been created by Kostas Apazidis (KonApaz) on Jul 4, 2014, 12:38:42 PM with the memo:
-
« previous (#2)
Changes
Title
unchanged
Migration the database schema to another one
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
Migration, copy, clone, anotherdatabase, schema design
Content
changed
[...]
public static function MigrateMsqlToSqlite() {
$path = Yii::getPathOfAlias('application.data');
$del = (@unlink($path . '/restaurantthedatabase.db'));
if (!$del) {
throw new CHttpException(403,'Access file permission denied!');
}
touch($path . '/
restaurantthedatabase.db');
$cmd = Yii::app()->dblite->createCommand();
$connection = Yii::app()->db;
$dbSchema = $connection->schema;[...]