我正在尝试应用以下迁移:
Schema::table('users', function (Blueprint $table) {
$table->timestamp('created_at')->useCurrent()->change();
});
Run Code Online (Sandbox Code Playgroud)
但是artisan说:
[Doctrine\DBAL\DBALException]
Unknown column type "timestamp" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL
\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). I
f this error occurs during database introspection then you might have forgot to register all database types for a
Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMapp
edDatabaseTypes(). If the type name is empty …Run Code Online (Sandbox Code Playgroud) php database-migration doctrine-orm sql-timestamp laravel-5.2