@@ -34,14 +34,14 @@ public static function compile($grammar, Blueprint $blueprint, Fluent $command,
34
34
}
35
35
36
36
$ schema = $ connection ->getDoctrineSchemaManager ();
37
- $ databasePlatform = $ schema ->getDatabasePlatform ();
37
+ $ databasePlatform = $ connection -> getDoctrineConnection () ->getDatabasePlatform ();
38
38
$ databasePlatform ->registerDoctrineTypeMapping ('enum ' , 'string ' );
39
39
40
40
$ tableDiff = static ::getChangedDiff (
41
41
$ grammar , $ blueprint , $ schema
42
42
);
43
43
44
- if ($ tableDiff !== false ) {
44
+ if (! $ tableDiff -> isEmpty () ) {
45
45
return (array ) $ databasePlatform ->getAlterTableSQL ($ tableDiff );
46
46
}
47
47
@@ -54,13 +54,13 @@ public static function compile($grammar, Blueprint $blueprint, Fluent $command,
54
54
* @param \Illuminate\Database\Schema\Grammars\Grammar $grammar
55
55
* @param \Illuminate\Database\Schema\Blueprint $blueprint
56
56
* @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema
57
- * @return \Doctrine\DBAL\Schema\TableDiff|bool
57
+ * @return \Doctrine\DBAL\Schema\TableDiff
58
58
*/
59
59
protected static function getChangedDiff ($ grammar , Blueprint $ blueprint , SchemaManager $ schema )
60
60
{
61
- $ current = $ schema ->listTableDetails ($ grammar ->getTablePrefix ().$ blueprint ->getTable ());
61
+ $ current = $ schema ->introspectTable ($ grammar ->getTablePrefix ().$ blueprint ->getTable ());
62
62
63
- return (new Comparator )->diffTable (
63
+ return (new Comparator )->compareTables (
64
64
$ current , static ::getTableWithColumnChanges ($ blueprint , $ current )
65
65
);
66
66
}
@@ -89,7 +89,7 @@ protected static function getTableWithColumnChanges(Blueprint $blueprint, Table
89
89
continue ;
90
90
}
91
91
92
- $ column ->setCustomSchemaOption ($ option , static ::mapFluentValueToDoctrine ($ option , $ value ));
92
+ $ column ->setPlatformOption ($ option , static ::mapFluentValueToDoctrine ($ option , $ value ));
93
93
}
94
94
}
95
95
}
@@ -106,7 +106,7 @@ protected static function getTableWithColumnChanges(Blueprint $blueprint, Table
106
106
*/
107
107
protected static function getDoctrineColumn (Table $ table , Fluent $ fluent )
108
108
{
109
- return $ table ->changeColumn (
109
+ return $ table ->modifyColumn (
110
110
$ fluent ['name ' ], static ::getDoctrineColumnChangeOptions ($ fluent )
111
111
)->getColumn ($ fluent ['name ' ]);
112
112
}
0 commit comments