Skip to content

Commit

Permalink
fix:getTables getColumns laravel版本限制
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjy committed Feb 26, 2024
1 parent 4da730a commit 3f5c2bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Generators/Model/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected function getTableSchemas(): array
*/
protected function getTables(): array
{
if (version_compare('10.0.0', app()->version()) === 1) {
if (version_compare('10.34.0', app()->version()) === 1) {
$sql = sprintf(
'select table_name as `name`, (data_length + index_length) as `size`, '
.'table_comment as `comment`, engine as `engine`, table_collation as `collation` '
Expand Down Expand Up @@ -217,7 +217,7 @@ protected function getTableColumn(string $table): array
*/
protected function getColumns(string $table): array
{
if (version_compare('10.0.0', app()->version()) === 1) {
if (version_compare('10.30.0', app()->version()) === 1) {
$sql = sprintf(
'select column_name as `name`, data_type as `type_name`, column_type as `type`, '
.'collation_name as `collation`, is_nullable as `nullable`, '
Expand Down

0 comments on commit 3f5c2bf

Please sign in to comment.