Skip to content

Commit 10fd251

Browse files
author
xavier
committed
gestion des champs de type text()
1 parent bfc1119 commit 10fd251

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Schema/Grammars/DB2Grammar.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@ protected function typeString(Fluent $column)
446446
*/
447447
protected function typeText(Fluent $column)
448448
{
449-
return 'text';
449+
$colLength = ($column->length ? $column->length : 16369);
450+
return "varchar($colLength)";
450451
}
451452

452453
/**
@@ -457,7 +458,8 @@ protected function typeText(Fluent $column)
457458
*/
458459
protected function typeMediumText(Fluent $column)
459460
{
460-
return 'mediumtext';
461+
$colLength = ($column->length ? $column->length : 16369);
462+
return "varchar($colLength)";
461463
}
462464

463465
/**
@@ -468,7 +470,8 @@ protected function typeMediumText(Fluent $column)
468470
*/
469471
protected function typeLongText(Fluent $column)
470472
{
471-
return 'longtext';
473+
$colLength = ($column->length ? $column->length : 16369);
474+
return "varchar($colLength)";
472475
}
473476

474477
/**

0 commit comments

Comments
 (0)