Skip to content

Instantly share code, notes, and snippets.

@camfindlay
Created August 27, 2015 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camfindlay/50bf3dd1cfaa42addcf7 to your computer and use it in GitHub Desktop.
Save camfindlay/50bf3dd1cfaa42addcf7 to your computer and use it in GitHub Desktop.
Switch to SQLite3 for testing when a query string is passed in
if (Director::isDev()) {
if (isset($_GET['db']) && $db = $_GET['db']) {
if ($db == 'sqlite3') {
$databaseConfig['type'] = 'SQLite3Database';
$databaseConfig['memory'] = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment