- Laravel 5.1
- Doctrine 2.3
という環境。
Schema::table('users', function (Blueprint $table) {
$table->timestamp('hogehoge')->create();
});
の後に
Schema::table('users', function (Blueprint $table) {
$table->timestamp('hogehoge')->nullable()->change();
});
とすると、このような長いエラーを吐く。
[Doctrine\DBAL\DBALException]
Unknown column type "timestamp" requested. Any Doctrine type that you use has to be registered with \Doc
trine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Ty
pe::getTypesMap(). If this error occurs during database introspection then you might have forgot to regi
ster all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have
your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a pr
oblem with the cache or forgot some mapping information.
Doctrineのエラーだから仕方ないとのこと。
DATETIME型にするしかないか。