New code, building a migration routine.

This commit is contained in:
James Cole
2014-06-30 07:26:38 +02:00
parent 5d430e7dad
commit ecadf005a8
23 changed files with 338 additions and 15 deletions

View File

@@ -0,0 +1,29 @@
<?php
class MigrationController extends BaseController {
public function index() {
// check if database connection is present.
$configValue = Config::get('database.connections.old-firefly');
if(is_null($configValue)) {
return View::make('migrate.index');
}
// try to connect to it:
try {
DB::connection('old-firefly')->select('SELECT * from `users`;');
} catch(PDOException $e) {
return View::make('migrate.index');
}
return Redirect::route('migrate.select-user');
}
public function selectUser() {
// select a user to import data from.
}
public function migrate($userID) {
// import the data.
}
}