\Doctrine\DBal\Types\Type::addType()
に追加したenumFooType
という列挙型の列型がありました。列を削除するときにdoctrineの移行を使用する
列を言っ削除になり、マイグレーションを発生させるためにvendor/bin/doctrine-module migrations:diff
を実行している場合、エラーがスローされました:私は、データベースが(DC2Type:enumFooType)
が付いfoo_type
を持っているので、エラーがスローされた
[Doctrine\DBAL\DBALException]
Unknown column type "enumFooType" 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().
If 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#getMappedDatabaseTypes().
If the type name is empty you might have a problem with the cache or forgot some mapping information.
推測しています。
これらのタイプの削除を処理する正しい方法は何ですか?私の最初の考えは、vendor/bin/doctrine-module migrations:generate
を使って空白のマイグレーションを生成し、手作業でクエリーを書くことです。しかし、できる限り手動で書くのではなく、もっと自動化したいと思います。