@@ -285,6 +285,30 @@ protected function createBlueprint($table, Closure $callback = null)
285285 return new Blueprint ($ table , $ callback , $ prefix );
286286 }
287287
288+ /**
289+ * Register a custom Doctrine mapping type.
290+ *
291+ * @param string $class
292+ * @param string $name
293+ * @param string $type
294+ * @return void
295+ *
296+ * @throws \Doctrine\DBAL\DBALException
297+ */
298+ public function registerCustomDoctrineType ($ class , $ name , $ type )
299+ {
300+ if (Type::hasType ($ name )) {
301+ return ;
302+ }
303+
304+ Type::addType ($ name , $ class );
305+
306+ $ this ->connection
307+ ->getDoctrineSchemaManager ()
308+ ->getDatabasePlatform ()
309+ ->registerDoctrineTypeMapping ($ type , $ name );
310+ }
311+
288312 /**
289313 * Get the database connection instance.
290314 *
@@ -318,28 +342,4 @@ public function blueprintResolver(Closure $resolver)
318342 {
319343 $ this ->resolver = $ resolver ;
320344 }
321-
322- /**
323- * Register your own Doctrine mapping type.
324- *
325- * @param string $class
326- * @param string $name
327- * @param string $type
328- * @return void
329- *
330- * @throws \Doctrine\DBAL\DBALException
331- */
332- public function registerCustomDBALType ($ class , $ name , $ type )
333- {
334- if (Type::hasType ($ name )) {
335- return ;
336- }
337-
338- Type::addType ($ name , $ class );
339-
340- $ this ->connection
341- ->getDoctrineSchemaManager ()
342- ->getDatabasePlatform ()
343- ->registerDoctrineTypeMapping ($ type , $ name );
344- }
345345}
0 commit comments