Skip to content

Commit af84c78

Browse files
stockalexandermfn
andauthored
Use platformName to determine db type (#1212)
* Use current connection platform (driver) instead of default connection name to determine used dbms. Previous solution isn't working, when multiple connections with custom names are used. * chore: add changelog Co-authored-by: Markus Podar <markus@fischer.name>
1 parent e71f3d5 commit af84c78

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ All notable changes to this project will be documented in this file.
77
### Fixed
88
- Fix recursively searching for `HasFactory` and `Macroable` traits [\#1216 / daniel-de-wit](https://github.com/barryvdh/laravel-ide-helper/pull/1216)
99

10+
### Fixed
11+
- Use platformName to determine db type when casting boolean types [\#1212 / stockalexander](https://github.com/barryvdh/laravel-ide-helper/pull/1212)
12+
1013
2021-04-09, 2.10.0
1114
------------------
1215
### Added

src/Console/ModelsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public function getPropertiesFromTable($model)
463463
$type = 'integer';
464464
break;
465465
case 'boolean':
466-
switch (config('database.default')) {
466+
switch ($platformName) {
467467
case 'sqlite':
468468
case 'mysql':
469469
$type = 'integer';

0 commit comments

Comments
 (0)