fixes and stuff
This commit is contained in:
@@ -17,7 +17,9 @@ class DatabaseSetupStep implements IStep
|
||||
|
||||
$databaseConnectionName = config("lucent.database");
|
||||
|
||||
|
||||
$databaseConfig = config('database.connections.'.$databaseConnectionName);
|
||||
|
||||
if (empty($databaseConfig)) {
|
||||
$instructions = <<<EOD
|
||||
# You need to setup a database connection for $databaseConnectionName in database.php config. You can choose either sqlite or pgsql
|
||||
@@ -35,6 +37,14 @@ EOD;
|
||||
return SetupStep::makeFail($name, $instructions);
|
||||
}
|
||||
|
||||
|
||||
if(!in_array($driver = $databaseConfig["driver"],["sqlite","pgsql"])){
|
||||
$instructions = <<<EOD
|
||||
You can choose either sqlite or pgsql. You current config is: $driver
|
||||
EOD;
|
||||
return SetupStep::makeFail($name, $instructions);
|
||||
}
|
||||
|
||||
try {
|
||||
Database::make()->table("records")->get();
|
||||
} catch (QueryException $e) {
|
||||
|
||||
Reference in New Issue
Block a user