New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PostgreSQL DB driver #52
Conversation
|
||
$db_name = 'testdatabase' . $this->randomString(10); | ||
app(DatabaseManager::class)->create($db_name, 'pgsql'); | ||
$this->assertNotEmpty(DB::select("SELECT datname FROM pg_database WHERE datname = '$db_name'")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a correct way of checking that a database exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, but Postgres converts all DB names to lowercase while the WHERE clause does not.
Codecov Report
@@ Coverage Diff @@
## 1.x #52 +/- ##
===========================================
+ Coverage 88.26% 88.4% +0.13%
- Complexity 128 130 +2
===========================================
Files 22 23 +1
Lines 341 345 +4
===========================================
+ Hits 301 305 +4
Misses 40 40
Continue to review full report at Codecov.
|
Fixes #51