Subject: | Cookbook entry for adding indexes incorrect about determining producer type |
I'm trying to add an index to a table, and the index's definition
depends on the underlying database type (support for retarded MySQL, to
be more precise).
http://search.cpan.org/perldoc?DBIx::Class::Manual::Cookbook#Adding_Indexes_And_Functions_To_Your_SQL
claims that one can "change the index depending on the type of the
database for which SQL is being generated" and gives this code example:
my ($db_type = $sqlt_table->schema->translator->producer_type)
=~ s/^SQL::Translator::Producer:://;
However, $sqlt_table->schema->translator->producer_type returns 'CODE'.
Is there another way to determine the underlying database in
sqlt_deploy_hook?