File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ public function __invoke(Column $column): bool
1212 return true ;
1313 }
1414
15+ // enum
16+ if ($ column ->getType ()->getName () === 'string ' && $ column ->getLength () === 0 ) {
17+ return true ;
18+ }
19+
1520 if ($ column ->getName () === 'deleted_at ' ) {
1621 return true ;
1722 }
Original file line number Diff line number Diff line change @@ -69,9 +69,13 @@ public function generate(Model $model): string
6969
7070 protected function table (Model $ model ): Table
7171 {
72- return $ this ->connection
73- ->getDoctrineSchemaManager ()
74- ->listTableDetails ($ model ->getTable ());
72+ $ schemaManager = $ this ->connection
73+ ->getDoctrineSchemaManager ();
74+
75+ $ schemaManager ->getDatabasePlatform ()
76+ ->registerDoctrineTypeMapping ('enum ' , 'string ' );
77+
78+ return $ schemaManager ->listTableDetails ($ model ->getTable ());
7579 }
7680
7781 protected function columns (Table $ table ): array
You can’t perform that action at this time.
0 commit comments